jit_image_manipulation icon indicating copy to clipboard operation
jit_image_manipulation copied to clipboard

Doesn't preserve EXIF-orientation on crop/resize.

Open jensscherbl opened this issue 13 years ago • 7 comments

It's basically all in the title. Will look into this and try to provide a fix...

jensscherbl avatar Oct 31 '12 00:10 jensscherbl

That's because GD strips out all image meta information. You'd have to read the metadata and re-insert it to the generated image or use imagemagick which supports metadata. I have a JIT version where I hacked imagemagick into, if you are interested.

I'm not suggesting to replace GD with imagemagick, but JIT could support some delegates to replace the image library or to modify the image after processing. But this would bloat JIT quite a bit.

Am 31.10.2012 um 01:39 schrieb Jens Scherbl [email protected]:

It's basically all in the title. Will look into this and try to provide a fix...

— Reply to this email directly or view it on GitHub.

klaftertief avatar Oct 31 '12 08:10 klaftertief

Already startet fixing it. Just reinserting the EXIF data wouldn't solve the problem, since not all browsers care about the EXIF orientation. So I'm checking the orientation on the server side and rotate the image accordingly before applying additional filters.

I'm not suggesting to replace GD with imagemagick

Why not? I read a lot about imagemagick being much more performant and easier to use. Needs to be implemented properly, though.

Relying on "hacked" code leads to situations like this, where I have to fix the system first instead of working with a reliable system on my client project (really frustrating).

jensscherbl avatar Oct 31 '12 14:10 jensscherbl

I'm not suggesting to replace GD with imagemagick

Why not. I read a lot about imagemagick being much more performant and easier to use. Needs to be implemented properly, though.

It's not installed all the time.

    ☜ klaftertief ☞ Webentwicklung Jonas Coch

Weißenburgstr. 8 50670 Köln +49 (0)221 17061941 +49 (0)151 27528221

http://klaftertief.de [email protected]

klaftertief avatar Oct 31 '12 14:10 klaftertief

It's not installed all the time.

Simple solution. Don't bundle JIT with the core (but treat it as a high priority extensions in terms of testing and development) and require imagemagick. Symphony is a professional tool, not for the masses, and good hosting providers have imagemagick already enabled or will enable it if you need it.

jensscherbl avatar Oct 31 '12 14:10 jensscherbl

Just to make things clear in this context, my changes are still GD based. Would be nice if you could have a look and try it out. See links for background information and sample images.

jensscherbl avatar Nov 01 '12 12:11 jensscherbl

This should be discussed in more detail. See forum.

michael-e avatar Nov 01 '12 12:11 michael-e

No problem, tried to explain it in greater detail on the forum.

jensscherbl avatar Nov 01 '12 13:11 jensscherbl