EXIF and large Thumbnail Size EXIF and large Thumbnail Size
 

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

EXIF and large Thumbnail Size

Started by jenma, July 16, 2004, 06:08:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jenma

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.

Joachim Müller

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

jenma

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. 

Tarique Sani

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

jenma

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?

jenma

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

Casper

Try using the admin tools, to rebuild the intermediate only.  I seem to remember reading that would do it.
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

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

Tarique Sani

Quote from: jenma 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?
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
SANIsoft PHP applications for E Biz

jenma

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

Tarique Sani

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

Joachim Müller

I agree, please commit.

GauGau

Tarique Sani

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

Carsten

#13
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

Tarique Sani

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

Joachim Müller

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

GauGau

Carsten

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

jenma

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

Carsten

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)

jenma

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.