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] 2   Go Down

Author Topic: EXIF and large Thumbnail Size  (Read 58492 times)

0 Members and 1 Guest are viewing this topic.

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
EXIF and large Thumbnail Size
« on: July 16, 2004, 06:08:10 am »

I'm using Coppermine 1.3 and Imagemagick and I'm facing the following problem.

When I first upload photos (1024 X 768, 96dpi, 220k) resized by Photoshop (regular save as jpeg), I get thumbnails that are over 30k.  This is a problem for me because I host my server at home and I need thumbnail sizes to be under 10k.

Then I tried to use the save to web function with Photoshop, after uploading the resized photos (1024 X 768, 96dpi, 200k), the thumbnail sizes did dropped dramatically to under 10k. 

I figured the major difference beteen the two is that I loose all the EXIF information when I "Save to Web".  As a result, I get smaller original resized photos and thumbnails.

The problem is I would like to have EXIF info.  So what I did was to add EXIF information to the original resized photos and upload again, which actually solves my problem.  But I thought it's a stupid way I have to do all that to achieve what I want: thumbnail sizes under 10k and displaying EXIF info.

Now my questions are: am I doing anything wrong in the process?  Does EXIF info really takes up that much space?  Does Imagemagick look into the EXIF when converting? 

Thanks in advance.
« Last Edit: January 01, 2005, 04:29:52 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EXIF and Thumbnail Size
« Reply #1 on: July 16, 2004, 07:59:28 am »

I don't get the point: why do you create thumbnails at all - that's something coppermine should be used for (and does it great). Did I get this wrong? There's no need for the exif info to reside in the thumbnails anyway, it will be enough if the exif info is being stored in the full-size pic and/or the intermediate. Included in your exif info there's as well an auto-generated thumbnail within the exif info that usually makes your file size larger (greatly depends on camera brand). I had a similar issue with pics from a Minolta Dimage, the thumbnail inside the exif info was just too huge, whereas my Canon Ixus produces nice, small exif thumbnails.

GauGau
Logged

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: EXIF and Thumbnail Size
« Reply #2 on: July 16, 2004, 03:01:53 pm »

Sorry, I must not have explained myself clearly.  I did use Coppermine/Imagemagick to create the thumbnails.  The thing is, thumbnail sizes created by imagemagick depends on the original file I put in. 

When I upload an original file with EXIF data, the thumbnails, created by Coppermine/Imagemagick, are bigger (30k); whereas if I upload an original file without EXIF data, the thumbs are under 10k. 

My problem is I do want to have the EXIF data in the origianl file so Coppermine can display them. 
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: EXIF and Thumbnail Size
« Reply #3 on: July 16, 2004, 03:14:14 pm »

Try and get one of the larger thumbnails and see if that also has inherited the EXIF data....
Logged
SANIsoft PHP applications for E Biz

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: EXIF and Thumbnail Size
« Reply #4 on: July 16, 2004, 03:50:29 pm »

Yeah, there is EXIF info in the larger thumbs.  I think that's why there're larger in size.  But Imagemagick won't discard that info in the thumbs, right?
Logged

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: EXIF and Thumbnail Size
« Reply #5 on: July 16, 2004, 05:49:03 pm »

To add to my problem, re-uploading images containing EXIF data would only work when the page containing th photo hasn't been viewed/displayed before.  Once the page has been viewed and the original photos without EXIF is loaded, then even when I re-upload original photo with EXIF, the EXIF info won't show up.  I tried to force the page to "read EXIF info again" under edit description and it's still doesn't do the trick...
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: EXIF and Thumbnail Size
« Reply #6 on: July 16, 2004, 09:06:11 pm »

Try using the admin tools, to rebuild the intermediate only.  I seem to remember reading that would do it.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: EXIF and Thumbnail Size
« Reply #7 on: July 16, 2004, 09:42:00 pm »

Thanks.  Actually I solved the problem by erasing the EXIF table with phpmyadmin.  But my original problem still exist...
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: EXIF and Thumbnail Size
« Reply #8 on: July 17, 2004, 04:43:50 am »

Yeah, there is EXIF info in the larger thumbs.  I think that's why there're larger in size.  But Imagemagick won't discard that info in the thumbs, right?
Hmmm.... there must be something which can be passed to imagemagic to make it discard the EXIF info, you will have to read up on that
Logged
SANIsoft PHP applications for E Biz

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: EXIF and Thumbnail Size
« Reply #9 on: July 17, 2004, 07:54:31 am »

YES!!!  You're wonderful.  Turns out I only needed to add -strip to the command line and I get small thumbnails.  Thanks!!!
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: EXIF and Thumbnail Size
« Reply #10 on: July 17, 2004, 08:35:40 am »

@all Devs - I recommend that -strip be added as a default option along with -antialias
Logged
SANIsoft PHP applications for E Biz

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EXIF and Thumbnail Size
« Reply #11 on: July 17, 2004, 09:20:29 am »

I agree, please commit.

GauGau
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: EXIF and Thumbnail Size
« Reply #12 on: July 17, 2004, 09:36:56 am »

Put it in basic.sql but decided against update.sql as it might overwrite if someone has already changed it
Logged
SANIsoft PHP applications for E Biz

Carsten

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
Re: EXIF and Thumbnail Size
« Reply #13 on: July 17, 2004, 08:14:34 pm »

Hi.

I also wondered why my thumbnails now are twice as big as they used to be .. ;)

But, to add "-strip" resulted in error messages. "-strip" doesn't seem to be a legal option of ImageMagick/convert.

Did I misunderstood something?

Edt:
Ok, "-strip" is a legal option of ImageMagick:
http://www.imagemagick.net/www/ImageMagick.html#details-strip
But I guess it's a new one. So there will be lots of failures if it will be added as a default option.

Edit #2:
The date it was added is 2003-06-06. See http://studio.imagemagick.org/www/Changelog.html.
To new for most webhosters I guess.

Edti #3:
Continuation of my monologue:
Use +profile '*' instead of -strip. Pay attention: use a "plus" and single quotes!
Works fine. Size of thumbnail 3.5 kB instead of 9.8 kB  ;D
« Last Edit: July 18, 2004, 01:44:33 pm by Carsten »
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: EXIF and Thumbnail Size
« Reply #14 on: July 18, 2004, 04:07:29 am »

In the light of above I think -strip should be removed and this topic be made a sticky
Logged
SANIsoft PHP applications for E Biz

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EXIF and large Thumbnail Size
« Reply #15 on: July 18, 2004, 08:26:42 am »

What exactly happens if a non-existing option is used for ImageMagick? Will it ignore, fail or do "funny" things?

GauGau
Logged

Carsten

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
Re: EXIF and large Thumbnail Size
« Reply #16 on: July 18, 2004, 01:06:52 pm »

When I tried to update the thumbs it failed: ERROR creating:$thumb
(I used Coppermine 1.21)
Logged

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: EXIF and large Thumbnail Size
« Reply #17 on: July 19, 2004, 09:11:48 am »

I tried +profile '*' before, but I get the ERROR creating:$thumb message.  I'm using Coppermine 1.3.0 and Imagemagick 6.0.3 right now.  I guess they updated the command in the newer versions...
Logged

Carsten

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
Re: EXIF and large Thumbnail Size
« Reply #18 on: July 19, 2004, 10:40:38 am »

ImageMagick 5.5.7 09/23/03 in front of me doesn't contain the -strip option. Should be integrated since 5.5.8.

As far as I know -strip is just an alias for +profile '*', as the quotes could cause errors.
Perhaps you could try +profile \'*\'. That also works here (CPG 1.2.1, IM 5.4.4 04/05/02)
Logged

jenma

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: EXIF and large Thumbnail Size
« Reply #19 on: July 19, 2004, 01:22:06 pm »

O, -strip worked for me alright.  I'm just posting in cause the developers have decided to add that to the default, it might cause problems depending on the different versions.

Thanks for your kind suggestion though.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.022 seconds with 19 queries.