protected function getColumnFormatFromFile($filename = null, $highDensityVertical = true)
{
if ($filename === null) {
return null;
}
$im = $this->getImageFromFile($filename);
$this->setImgWidth($im->getimagewidth());
$this->setImgHeight($im->getimageheight());
/* Strip transparency */
$im = self::alphaRemove($im);
$im->setformat('pbm');
$im->getimageblob();
// Forces 1-bit rendering now, so that subsequent operations are faster
$im->rotateImage('#fff', 90.0);
$im->flopImage();
$lineHeight = $highDensityVertical ? 3 : 1;
$blobs = $this->getColumnFormatFromImage($im, $lineHeight * 8);
return $blobs;
}