CodeIgniter Forums

Full Version: Image resizing - still large filesize
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Joshb[/eluser]
Hi, I'm using the CI Image Manipulation library with ImageMagick to resize images to various sizes for different parts of a site I'm working on.

The images uploaded by the client are just under 1MB (400x300px). One of the sizes I'm resizing to is 118x84px. Its working, but the filesize isn't changing much. The file created is 595.57KB, but if I manually put this into Fireworks and resave (no additional compression - 100 quality), it comes out looking exactly the same but at 11.73KB.

The images are:
595.57KB http://img36.imageshack.us/img36/5282/al...ripe01.jpg
11.73KB http://img182.imageshack.us/img182/2732/...ripe02.jpg

These are the same image, same dimensions, just huge difference in filesize.

I tried using the quality option of the CI library, however this only made a very small change in filesize with noticably quality reduction.

I don't know enough about image formats to know whats causing the difference in filesize - does anyone know about this, and how I might be able to make CI output images with a similar size to Fireworks?

Thanks,
Josh

El Forum

[eluser]Dam1an[/eluser]
And what do you get if you convert the image directly with Image Magick? As I'm guessing thats where the problem lies

El Forum

[eluser]LuckyFella73[/eluser]
I downloaded you file (500KB) and openend with photoshop.
The file was created in CMYK modus, and 300 dpi. I think
there your problem is.
Try to create your image in RGB and 72 dpi and test again.

El Forum

[eluser]Joshb[/eluser]
Yes, same if I do it directly.

LuckyFella73, thats it! Also explains why chrome wasn't loading the images - it mustn't support CMYK.

Tried using -colorspace and +/-profile in imagemagick, but not got it working correctly yet...for now using a batch image processor to convert all to RGB at 72DPI.

Thanks for coming up with the solution, especially less than 10minutes after I posted the problem!

Josh

El Forum

[eluser]LuckyFella73[/eluser]
Glad I could help Smile