Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Pictures rotated incorrectly after import  (Read 5738 times)

0 Members and 1 Guest are viewing this topic.

ikaruga

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Pictures rotated incorrectly after import
« on: October 08, 2008, 02:11:13 am »

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?
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Pictures rotated incorrectly after import
« Reply #1 on: October 08, 2008, 03:19:43 am »

Quote
However, 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.
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Pictures rotated incorrectly after import
« Reply #2 on: October 08, 2008, 10:03:02 am »

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.
Logged

ikaruga

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Pictures rotated incorrectly after import
« Reply #3 on: October 08, 2008, 03:53:45 pm »

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
Logged

ikaruga

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Pictures rotated incorrectly after import
« Reply #4 on: October 08, 2008, 04:46:14 pm »

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.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4886
    • Windsurf.me
Re: Pictures rotated incorrectly after import
« Reply #5 on: October 08, 2008, 04:54:05 pm »

Post an account as requested above.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ikaruga

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Pictures rotated incorrectly after import
« Reply #6 on: October 08, 2008, 09:55:41 pm »

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...
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4886
    • Windsurf.me
Re: Pictures rotated incorrectly after import
« Reply #7 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.

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.
« Last Edit: October 08, 2008, 10:45:01 pm by phill104 »
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ikaruga

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Pictures rotated incorrectly after import
« Reply #8 on: October 09, 2008, 04:52:21 am »

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...
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4886
    • Windsurf.me
Re: Pictures rotated incorrectly after import
« Reply #9 on: October 09, 2008, 09:20:57 am »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ikaruga

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Pictures rotated incorrectly after import
« Reply #10 on: October 09, 2008, 04:57:52 pm »

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?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4886
    • Windsurf.me
Re: Pictures rotated incorrectly after import
« Reply #11 on: October 09, 2008, 06:20:51 pm »

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

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

Nibbler

  • Guest
Re: Pictures rotated incorrectly after import
« Reply #12 on: October 09, 2008, 07:22:05 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.