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: [Closed]: Picture orientation doesn't respect EXIF data  (Read 9832 times)

0 Members and 1 Guest are viewing this topic.

SDelroen

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
[Closed]: Picture orientation doesn't respect EXIF data
« on: July 26, 2009, 08:30:55 am »

Hi everybody !

I just started using Coppermine, it's really cool !

I'm just experiencing a little problem: when I watch a picture locally on my computer with a picture viewer, it respects the "Orientation" parameter of the EXIF data, but when I upload my pictures to Coppermine, they are all displayed in Landscape format, whatever the EXIF "Orientation" parameter says.

How can I correct that ?

Thank you !

Samuel

PS: I'm not sure whether this problem is a question of upload or of image display, sorry if I posted in the wrong place.
« Last Edit: July 29, 2009, 11:58:43 am by Joachim Müller »
Logged

Nibbler

  • Guest
Re: Picture orientation doesn't respect EXIF data
« Reply #1 on: July 26, 2009, 01:47:32 pm »

You need to 'physically' rotate the images before uploading them to Coppermine.
Logged

SDelroen

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Picture orientation doesn't respect EXIF data
« Reply #2 on: July 26, 2009, 05:27:01 pm »

You need to 'physically' rotate the images before uploading them to Coppermine.

You mean this feature is not implemented in Coppermine ?

Isn't there any plug-in that could do that ?

If not, could be an idea for someone having spare time and programming skills... ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Picture orientation doesn't respect EXIF data
« Reply #3 on: July 27, 2009, 08:01:45 am »

The image libraries that Coppermine (or any possible plugin) is using (GD or ImageMagick) don't support EXIF but drop that information from the new, rotated file. Therefore, it's not a missing feature from coppermine, but from the image libraries GD and ImageMagick. The coppermine devs will gladly add support for it if the devs of the GD library will support it. Your request is invalid. There can be no mod nor plugin that can accomplish this server-sided. That's why Nibbler suggested to rotate client-sided before uploading, which is easier, faster and much less resources-intensive than performing that on the server.
Logged

SDelroen

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Picture orientation doesn't respect EXIF data
« Reply #4 on: July 27, 2009, 10:37:15 am »

Hi Joachim, thank you for your reply.

I didn't know that the exif implementation in Coppermine relies on a separate lib.

Coppermine can natively read EXIF and can rotate pictures, so I can't see any reason why it couldn't automatically rotate a pic depending on the EXIF data of that pic...

The very reason why I started using Coppermine is I am using a high resolution camera and a very low spec computer, so opening a photo locally is already a pain, and I just don't want to try rotating one. But my server could handle that easily, I think. (By the way, why would would it be "much less resources-intensive" on the client side than on the server side, in a general case ?)

This feature I am asking for is pretty basic, I would be surprised to be the only one interested in it.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Picture orientation doesn't respect EXIF data
« Reply #5 on: July 27, 2009, 11:46:30 am »

Coppermine can natively read EXIF and can rotate pictures, so I can't see any reason why it couldn't automatically rotate a pic depending on the EXIF data of that pic...
Look, what rotation in coppermine does is that it actually creates a new file (calculation based on the original-unrotated image). After a successfull creation of the new file it deletes the original and renames the newly created image with the name the original had. Finally, the information in the database about the dimensions are being re-written. That's all. The step of creating a new file is being performed by the GD library, which doesn't support EXIF. Subsequently, the EXIF data stored in the original, unrotated image is lost. As you already figured out, coppermine has got the capabilities to read EXIF data, but it doesn't have the capabilities to write EXIF data. Those capabilities would have to exist in the image library in the first place before we (the coppermine developers) could implement that feature in Coppermine's code. But alas, those EXIF write capabilities don't exist in GD. There's nothing we could do to circumvent that.
This feature I am asking for is pretty basic
Basic in functionality, but not in terms of programming.

But my server could handle that easily, I think.
That's complete and utter nonsense that could only come from someone who doesn't understand the technology involved. Just false assumptions. Don't!

I would be surprised to be the only one interested in it.
I don't doubt that many would find that usefull. Personally, I'd find it very usefull if someone invented boots to walk on water, glasses that enable you to see through walls and maybe a belt that enabled you to fly because it negated gravity. Those inventions would be terribly usefull, but they don't get invented for very practical reasons: because it's beyond the capabilities of engineers or inventors, or simply because it's impossible. A similar thing applies for the feature you ask for: just wanting a feature badly doesn't mean that it can be achieved. You need to be a coder to understand why, as much as you need to be an engineer to understand why you can't create the boots to allow you to walk on water. Since you don't seem to be a programmer, you need to accept my statement that it's impossible to code what you're requesting. You're of course welcome to provide custom code that proofs me wrong. If you can't, please stop insisting. The fact that many mind find a feature usefull doesn't mean that impossible things can be done.
Logged

SDelroen

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Picture orientation doesn't respect EXIF data
« Reply #6 on: July 28, 2009, 11:37:40 am »

That's complete and utter nonsense that could only come from someone who doesn't understand the technology involved. Just false assumptions. Don't!
I only assumed that my server could rotate the picture much faster than my client, which I still believe to be true.

Since you don't seem to be a programmer, you need to accept my statement that it's impossible to code what you're requesting. You're of course welcome to provide custom code that proofs me wrong. If you can't, please stop insisting. The fact that many mind find a feature usefull doesn't mean that impossible things can be done.
Unhappily for the world I am supposed to be some kind of a programmer, just I didn't know that GD doesn't have the ability to modify files but only to create ones.
That made me think I understood though I actually didn't, but thanks to your explanation I now do. I apologise for my ignorance, not for my insistance...

Correct me if I'm wrong, but currently, when I rotate a pic in Coppermine, I lose the EXIF data.

I still don't see why it's impossible to rotate a picture depending on its original EXIF data, even if this data is lost in the process...

In pseudo code, would be something like that:

Code: [Select]
upload(pic)
if(pic.exif.orientation != NULL)
{
    orientation = pic.exif.orientation
    rotate(pic,orientation)
}

Seems quite trivial, but

The EXIF data is lost, right, but that's already what happens if I do it manually, so users should be aware of it.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Picture orientation doesn't respect EXIF data
« Reply #7 on: July 28, 2009, 12:19:19 pm »

Please pardon me for interjecting here, but conceptually there is something generally wrong with.....

I only assumed that my server could rotate the picture much faster than my client

IMO the purpose of the server is to serve pages to users and visitors. CPU/memory intensive activities such as what you desire would adversely affect the server's performance and ability to serve efficiently. Yes, it would be convenient for a single user gallery with low traffic, but would be a disaster (IMO) for a busy gallery with many users.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Picture orientation doesn't respect EXIF data
« Reply #8 on: July 28, 2009, 03:04:28 pm »

Correct me if I'm wrong, but currently, when I rotate a pic in Coppermine, I lose the EXIF data.
That's what I said. Thanks for repeating the obvious.

I still don't see why it's impossible to rotate a picture depending on its original EXIF data, even if this data is lost in the process...
Go ahead and code that if you want,  but please stop lecturing on programming if you claim not to be a programmer, OK?
Logged

SDelroen

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Picture orientation doesn't respect EXIF data
« Reply #9 on: July 29, 2009, 10:49:47 am »

i-imagine, I don't agree with you. IMHO, the purpose of a server depends on what its owner wants it to do... If I decide that my server should be able to treat memory/CPU intense activity, I will have to scale it in consequence, that's it.

Go ahead and code that if you want,  but please stop lecturing on programming if you claim not to be a programmer, OK?
Sorry if my speech seemed lecturing to you, that wasn't my point. Feeling lectured by someone who seems wrong mustn't be pleasant, that's why I apologise. So as for me, I felt flamed by your last post, which wasn't pleasant either.

Now, to make it clear, by "I don't see why this or that", what I meant is "You said this or that, I don't understand why".

To be more precise, could you please explain me why the EXIF data cannot be read and then used to automatically start a rotation with the right parameter ?

If you don't want to/don't have time to/have any reason not to explain me, just tell me "I won't explain you", but please don't flame me again.

Have a nice day (or night, wherever you are).

Samuel
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Picture orientation doesn't respect EXIF data
« Reply #10 on: July 29, 2009, 11:58:33 am »

i-imagine, I don't agree with you. IMHO, the purpose of a server depends on what its owner wants it to do... If I decide that my server should be able to treat memory/CPU intense activity, I will have to scale it in consequence, that's it.
You don't seem to understand the limitations of a webserver nor the setup of a webserver. There are many limitations that apply for a webserver: on operating system level, on bandwidth level, memory level, webserver (apache) level, PHP level, connection level. That's why it can't and shouldn't be used for the same thing you use your PC for. Sure, you can use a server to resize a pic, but not a webserver. There is a difference between the term "server" and "webserver": although only three letters, the difference is dramatic. Coppermine is an app that can only run on a webserver, so your rant about using a server for whatever you think is not applicable. Quite frankly: you're wrong. Please let it end here - there is no reason in claiming that you know better. You don't. If you think otherwise, tell people somewhere else about it.

To be more precise, could you please explain me why the EXIF data cannot be read and then used to automatically start a rotation with the right parameter ?
It is possible. You want that "auto-rotate on exif property" feature -> you code it. That's what I tried to say. You'll loose the exif information in the rotated pic nevertheless.

If you don't want to/don't have time to/have any reason not to explain me, just tell me "I won't explain you"
OK: I won't explain again, as I already have.

but please don't flame me again.
I haven't.

Locking.
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 15 queries.