Pictures rotated incorrectly after import Pictures rotated incorrectly after import
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Pictures rotated incorrectly after import

Started by ikaruga, October 08, 2008, 02:11:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ikaruga

Basically, on my desktop, the pictures look fine. I may used one of gphoto, gwenview, or digikam to rotate the picture.
However, once I import the photo into coppermine, it's rotated incorrectly.

How can I fix this?
Or how can I prevent this from happening?

Fabricio Ferrero

QuoteHowever, once I import the photo into coppermine, it's rotated incorrectly.
Coppermine doesn't rotate your images in the uploading proces.

Post a gallery and a non administrative accout with upload permission to test it please.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Joachim Müller

If rotation works fine on your client and doesn't work on the server, then why don't you just rotate the pics on the client before uploading them. Rotation is a resources-consuming process on the server, where a lot of things can go wrong. That's why it's a better option to perform the rotation on the client.

ikaruga

Screwing up the pictures on the client is hardly the ideal solution -- I view those photos on my desktop.
Also, gallery2 had no problem viewing these photos. So I assume this may be something that coppermine is getting wrong.

So basically you guys don't really know what's going on?

I'm going to try again to confirm

ikaruga

Also, Joachim, I don't think I explained myself clearly:

* The pictures look fine on my desktop computer.
* Once I import them into coppermine, the rotation is wrong.
* HOWEVER, there is NO actual rotation. Coppermine did NOT touch the photo at all -- (however, it is displaying it incorrectly).

It appears that this is related to the exif data -- coppermine is either ignoring it or the program I used to rotate the photo is messing it up.

phill104

It is a mistake to think you can solve any major problems just with potatoes.

ikaruga

Why do I have to open up my web server? (Didn't you read my previous post?)

I was able to confirm that the problem is the exif data.

You can duplicate the error on YOUR coppermine gallery by doing the following:

* Rotate a picture using any program that only changes the exif info (and doesn't actually rotate the picture). For example, in kde 3.5, right-click on the file, under Actions, select rotate 90. This will change the exif info but won't actually rotate the photo. Also, most cameras only change the exif info but don't actually rotate your photo.
* Upload that photo to your coppermine gallery.
* Presto --- "error" duplicated.

It would be nice if coppermine took the exif data into account when importing photos -- gallery2 can do this.

You can fix these pictures using a utility called jhead and the -autorot option. However, I now have the task of writing a script that fixes only pictures with the exif info out of whack, then updating the coppermine thumbnails...

phill104

#7
What you need to do is to use a package that actually rotates the picture rather than just writing a tag in the exif data. Getting coppermine to read that data then manipulate the image on the server would just eat up server resources so is rather pointless. All coppermine really does is store and display files in the way they were uploaded.

All this is explained above. If you really want help then why do you not do as requested? The dev's and supporters do not have some magical ability to see what is going on from a few lines just stating that your pictures are not rotated as you expect.
It is a mistake to think you can solve any major problems just with potatoes.

ikaruga

Quote from: phill104 on October 08, 2008, 10:39:38 PM
What you need to do is to use a package that actually rotates the picture rather than just writing a tag in the exif data. Getting coppermine to read that data then manipulate the image on the server would just eat up server resources so is rather pointless. All coppermine really does is store and display files in the way they were uploaded.

This is exactly what I concluded before. Thank you for repeating me :) (I don't quite follow your english.)

However, this is hardly the ideal solution. As I also pointed out before, gallery2 does this quite succesfully. From what I gather, it's NOT a "CPU intensive" process. Unfortunately, I don't have the dev skills to implement it in coppermine. But it would be a nice feature to have (as it saves the user headaches -- helping the inexperienced user is always a good "feature").

In the mean time, I did find a "workaround" using jhead. I'll post the script when I have some time...

phill104

The problem with using jhead is that not all servers have this installed especially windows based ones so not everybody could make use of it.
It is a mistake to think you can solve any major problems just with potatoes.

ikaruga

Jhead issues aside. I tried fixing a test picture.
For this test picture, I fixed the exif flag using jhead, I also fixed it's "normal" and thumbnail version.
I downloaded all 3 files from my server and sure enough they are all fixed.
HOWEVER, viewing them in the gallery is another story.
The normal version is fine -- the orientation is correct. But the thumbnail is a squashed square and the full-size photo still has the wrong orientation.
What's going on? Are the dimensions of the pictures hardcoded into the database?
If so, does that mean that I have to use the "Resize pictures Admin tool"? I was trying to have to avoid doing this, as the affected files are only about 100 -- otherwise, coppermine would process all +6000 photos!
Any ideas?

phill104

Yes, you have to regenerate the thumbs. They are generated once while uploading not on the fly like some album apps.

It is a mistake to think you can solve any major problems just with potatoes.

Nibbler

There's a feature in admin tools to reload file size and dimension information. Admin tools works on an album basis - you don't have to reload all images in the entire gallery.