![]() |
Codeigniter resizing EXIF standard images - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Codeigniter resizing EXIF standard images (/showthread.php?tid=60373) |
Codeigniter resizing EXIF standard images - El Forum - 03-10-2014 [eluser]mstojanov[/eluser] I have a little problem about resizing my images in Codeigniter framework using the image libary GD2. Everything works fine with images like : JPEG image data, JFIF standard 1.01(standard), the resize and thumbs making is okay. But the problem is when someone try to upload an image like 'JPEG image data, EXIF standard', the resize and thumb make is not happening and the images upload like original with HIGH quality. I'm owning a Ads website so i need to fix this really quick. But when i try to upload theese images on my localhost and resize them its working i dont really understand where is the problem. Waiting for a little help. Btw here is my code if someone things that there is problem in my code but i really dont agreed. Code: $this->load->library('upload'); Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]InsiteFX[/eluser] Your web host may not allow the eval php statement, check with them. Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]mstojanov[/eluser] [quote author="InsiteFX" date="1394527725"]Your web host may not allow the eval php statement, check with them. [/quote] Its think its allowed because for the other images its processing the eval function and I get resized images. Example 10 ads get resized images and in the 11 ad post the resize is not happening. As I can see in my file manager the images which is not resized are like the type mentioned on my first post. I will check the php version and I will check with my provider. More help will be appreciated. Thanks Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]InsiteFX[/eluser] Check your ./application/config/mimes.php file and see if those extensions are in it. If not you will need to add them in. Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]mstojanov[/eluser] Here is what i have in my mimes.php file : Code: 'bmp' => array('image/bmp', 'image/x-windows-bmp'), Here is an example of the resized and not resized images i can see this in my CPANEL where i open my images. This is the difference between the resized and not resized images. All not resized images have EXIF format i really dont understand this. Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]InsiteFX[/eluser] Mime Types There are two different mime types for those try adding the other 2. Also check where your clearing the image lib it could be in the wrong place. Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]mstojanov[/eluser] [quote author="InsiteFX" date="1394564051"]Mime Types There are two different mime types for those try adding the other 2. Also check where your clearing the image lib it could be in the wrong place. [/quote] Thanks for your effort. I will try to add the other ones and i will let you know here if that helps me. Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]CroNiX[/eluser] I don't believe the gd2 library preserves exif data on its own, so anything resized or manipulated and resaved will probably be missing most of the data, except what it adds itself like if you resize it will probably save the new size in exif. You will probably have to use a PEL library to edit the exif data if you want it preserved or use additional libraries that work with exif. Google "php preserve exif". You might also check whether ImageMagick can preserve the data. Not sure. Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]InsiteFX[/eluser] Code: // these are OK. Codeigniter resizing EXIF standard images - El Forum - 03-11-2014 [eluser]mstojanov[/eluser] [quote author="InsiteFX" date="1394565864"] Code: // these are OK. Does the TIFF mimes have something related with my problem ? Thanks for your effort i will try to add them into my mimes.php and check if there still a problem with the EXIF . [quote author="CroNiX" date="1394565383"]I don't believe the gd2 library preserves exif data on its own, so anything resized or manipulated and resaved will probably be missing most of the data, except what it adds itself like if you resize it will probably save the new size in exif. You will probably have to use a PEL library to edit the exif data if you want it preserved or use additional libraries that work with exif. Google "php preserve exif". You might also check whether ImageMagick can preserve the data. Not sure.[/quote] Thanks for your effort. I will try to use the ImageMagick and will let you know if everything is okay then. Or try some other solutions you mentioned |