how to change barcode image type png to jpg

Write here for everything about system module in SLiMS.

Moderators: wynerst, buitenzorg812, purwoko, sutriadi, ido, Dicarve, ridorido

how to change barcode image type png to jpg

Postby jushadi » 13 Sep 2014, 16:10

S : Hello Hadi and welcome to the forum
H : Hello, I wonder how to change barcode image type from png to jpg/jpeg, gif
in zend barcode http://framework.zend.com/manual/1.12/e ... ation.html
'rendererParams' => array('imageType' => 'gif'),
imageType String "png" Specify the image format. Can be "png", "jpeg", "jpg" or "gif".

in ./lib/Zend/Renderer/Image.php
line 40
Code: Select all
protected $_allowedImageType = array(
        'png',
        'jpeg',
        'gif',
    );

and line 50
Code: Select all
protected $_imageType = 'png';

line 167
Code: Select all
   /**
     * Set the image type to produce (png, jpeg, gif)
     *
     * @param string $value
     * @return Zend_Barcode_RendererAbstract
     * @throw Zend_Barcode_Renderer_Exception
     */
    public function setImageType($value)
    {
        if ($value == 'jpg') {
            $value = 'jpeg';
        }


I've tried to change png to jpg but the exported image still in png, I was exited because it looks as easy as change png to jpg, but nooooo
anyone can help me please
Read!
User avatar
jushadi
 
Posts: 35
Joined: 27 Sep 2011, 16:29
Location: Makassar

Return to System Module

Who is online

Users browsing this forum: No registered users and 2 guests

cron