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: ITCP keyword metadata is removed from uploaded file  (Read 9346 times)

0 Members and 1 Guest are viewing this topic.

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
ITCP keyword metadata is removed from uploaded file
« on: June 18, 2010, 02:26:12 am »

Need to retain metadata in file

Here is the situation; I have an image file that I have added keywords to with Photoshop (or other software). 

I have ‘Read IPTC data from JPEG files’ enabled. I have ‘Watermark images’ disabled. I have the maximum size in bytes and pixels set larger than the image I am uploading. I have left the ‘Quality of JPEG files’ at the default of 80%.

I upload the image using the web interface. The keywords from the image are added to the database.
I browse to this image in Coppermine and save the ‘original’ to my hard drive. The image in KB is smaller than the one that I uploaded and the metadata keywords have been removed.

I hope you don’t think these are separate questions, I think they are related.

I need the metadata keywords to remain in the file. How do I prevent them from being removed?

 Is this caused by the file being rewritten? I would like the image to be copied not rewritten if possible.
I understand the JPEG quality setting applies to the ‘normal’ and thumbnail images, is it also applied to recompressing the ‘original’, and if so, could it be a separate setting?

I am new to Coppermine and PHP. I have someone I work with that is experienced in PHP.
I have searched through the forum and do not see this question addressed. We have read through what seems to be the relevant PHP.
We are still testing Coppermine to see if it meets our needs and it is running on a server inside our firewall and with some proprietary images, so I cannot provide a link. This is a basic installation without any add-ons etc. This is a new, recent installation, cpg156.

Thanks in advance, Mark
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: ITCP keyword metadata is removed from uploaded file
« Reply #1 on: June 18, 2010, 10:34:50 am »

I browse to this image in Coppermine and save the ‘original’ to my hard drive.
What's the name of that file. Please post an example. Please also post your watermark settings.

How do I prevent them from being removed?

 Is this caused by the file being rewritten?
GD (and maybe ImageMagick, too) cannot handle meta data. If the file is touched, it will be lost. But the file shouldn't be touched with the correct settings.


If you can, please use the latest svn checkout and test again, as we recently changed a small thing in the resizing process.
Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #2 on: June 18, 2010, 10:29:56 pm »

Hi Thanks,

Between your reply and a few more experiments I think I understand what is going on.

I tried several things, but the 'solution' is in the Configuration, File settings, the check box 'Auto re-size...'

Even though the file size and pixel size limits are larger than the uploaded file, it re-sizes it in compression, or quality value. Which makes sense I suppose. When I change this to -No for everyone- the metadata is retained. I would like to try ImageMagick and see if it can resize and retain metadata.

What is the svn checkout?

Thanks again, how do I mark this 'solved'?


Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: ITCP keyword metadata is removed from uploaded file
« Reply #3 on: June 19, 2010, 10:23:55 am »


What is the svn checkout?
See here.

Thanks again, how do I mark this 'solved'?
This is explained here.

In addition, you have not posted a link to your gallery as requested by board rules.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: ITCP keyword metadata is removed from uploaded file
« Reply #4 on: June 19, 2010, 05:22:31 pm »

Even though the file size and pixel size limits are larger than the uploaded file, it re-sizes it in compression, or quality value. Which makes sense I suppose.
That's not intended afaik.
Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #5 on: June 19, 2010, 10:37:29 pm »

I would think that the 'auto resize check box' is not entirely clear, it states pixel size not compression as the factors.

Perhaps it could be 2 check boxes?

Regarding posting a link to my gallery, I explained on the first post it is on a company server inside a firewall
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: ITCP keyword metadata is removed from uploaded file
« Reply #6 on: June 21, 2010, 10:20:22 am »

No problem, just post the link anyway, even if we can't access it.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: ITCP keyword metadata is removed from uploaded file
« Reply #7 on: June 22, 2010, 12:10:14 pm »

I would think that the 'auto resize check box' is not entirely clear, it states pixel size not compression as the factors.
It should only resize your picture if the dimensions are bigger than the entered values. We don't check for compression.
Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #8 on: June 22, 2010, 07:46:41 pm »

It seems to resize regardless of pixel dimensions if resize is turned on.
I did several experiments with this. I took a jpg file and saved it in the highest quality in Photoshop.
The pixel dimensions are 986 X 656. The file size, saved in highest quality is 412 KB.
Not e the allowed file size in pixels and KB are larger than the test file. I also turned up the max file size in php.ini.

For the relevant experiments I changed only 2 variables:
Quality for JEPG files, which I set at 100% and 80%
And
Auto resize images that are larger than max width or height, which I set at No and Yes: Everyone
The results,
if Quality is set to 100 and Auto resize is set to Yes the file is re-written. The file on the server is only 98 KB and the meta data is removed.
if Quality is set to 80 and Auto resize is set to No the file is not re-written. The file on the server is original size, 412 KB and the metadata is retained.
Attached is ‘original’ test image and screen shot of settings
Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #9 on: June 22, 2010, 07:53:27 pm »


I marked this solved, the reason the meta data is removed is that the file is re-written by GD
Maybe a new thread would be 'image is re-written' when it shouldn't be?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: ITCP keyword metadata is removed from uploaded file
« Reply #10 on: June 22, 2010, 08:11:42 pm »

The file size doesn't matter. I will perform some tests tomorrow. No need for a new thread imo.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: ITCP keyword metadata is removed from uploaded file
« Reply #11 on: June 24, 2010, 12:20:28 pm »

I cannot confirm, that the image file is re-written if it's smaller than the maximum dimensions. I tested it with simple upload, flash uploader and batch-add. Everytime the same result: file is not re-written, meta data is still there.
Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #12 on: June 24, 2010, 07:33:30 pm »

File rewrite 6 24 2010

Crazy…   not you

I just tried it again and the behavior is as I described.

This is a ‘stock’ installation of CM 156, installed on June 8 2010

Here is what I did this morning:

Test 1

I took a jpg file and in Photoshop added some keywords, description and title.
I saved it at the maximum quality, 12
The file name is:                            CM test keywords c2l.jpg
The size on the local HD is 134 KB
The pixel dimensions are: 600 X 398
In the CM file configuration I have the following settings:
Quality of JPEG 80%
Max size for uploaded files 8024 KB
Max width or height for uploaded pictures 4500 pixels
Auto resize images that are larger than max width or height Yes: Everyone
See attached screen shot:         file setting - test 1 - 6 24 2010 9-33 am.jpg
I uploaded to my CM with the Flash interface
The keywords etc are read and put in the database
I downloaded the full size file from CM, right click and save
dl from CM t1 - CM_test_keywords_c2l.jpg
The downloaded file is only 41 KB and does not have any meta data according to Photoshop
I also looked in the usepics folder to see if it is the same as the dl file, which it is
See screen capture of the folder, this file is the 6th file from the top:
userpics folder screen.jpg

Test 2

I started with the same jpg, drew on it in Photoshop so I can tell it apart and saved it at the max quality
The file size of this on the local HD is slightly larger than before at 143 KB
t2 - CM test keywords c2l.jpg
In the Coppermine configuration I changed only one setting,
Auto resize images that are larger than max width or height No
I upload and downloaded in the same way
The file after download is 143 KB and has the metadata in Photoshop
dl from CM t2 - t2_-_CM_test_keywords_c2l.jpg
The file in userpics is the 3rd from the top in screen shot:
userpics folder screen.jpg


http://10.10.1.75/cpg156/index.php

A story from a friend that worked tech support in the time of DOS. He is trying to get the user to copy a file, he keeps repeating, “Type copy file.xxx” and user keeps saying “it doesn’t work” finally he says “read it back to me, letter by letter” and the user reads “copy file dot xxx”.


Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #13 on: June 24, 2010, 07:35:18 pm »

The forum only allowed me to upload 5 of the explanatory images, but the larger, in KB jpg would represent the originals before upload
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: ITCP keyword metadata is removed from uploaded file
« Reply #14 on: June 24, 2010, 07:54:14 pm »

Do you test with the latest svn checkout or with the official cpg1.5.6 package?
Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #15 on: June 24, 2010, 08:01:40 pm »

One of our IT people installed and set this up for me
I assume he only did what the 'official' straight forward dl and set up had him do

I will track him down and see if he can install the sub version

Is this just a matter of replacing a few files over the existing ones?

Thanks, Mark
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Logged

mark22

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: ITCP keyword metadata is removed from uploaded file
« Reply #17 on: June 24, 2010, 08:18:23 pm »

Now I am a bit confused, is the current upgrade you refer to include the latest sub version? If we dl’ed and installed CM a couple weeks ago, and the version number is the same, will this upgrade be different than what we installed? Let me go over the situation and documents with our IT guy and see how it goes.

I also have a comment and tip regarding meta data - meta data editors etc, I will post that as a new topic

Thanks again
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: ITCP keyword metadata is removed from uploaded file
« Reply #18 on: June 24, 2010, 08:31:51 pm »

You should use the latest svn checkout to upgrade your gallery (or testbed) if you can. Maybe the issue is already fixed there. Here are some more information about svn: http://documentation.coppermine-gallery.net/en/dev_subversion.htm#dev_subversion_download
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 20 queries.