Small uploaded images are sized up to picture size limit

mattsson

Joined: 2005-07-02
Posts: 25
Posted: Tue, 2005-07-05 22:28

Hello,

I'm learning to set up albums in my Gallery 2 new install.

When I upload images, dimensions of larger images are correctly reduced to fit the picture size limit, but the dimensions of smaller images are *increased* to fit. In an example case, of an image originally sized 640 x 480, there was no intermediate sized image created, and there is only a large image with dimensions of 1333 by 1000.

How can I fix it so the smaller images are not resized if they are already small enough?

I observed this both in upload from Windows XP and upload from the web browser.

My album setup includes:

Thumbnails 160

Resized Images 640 x 640

Define picture size limit 10000 x 1000

Maximum dimensions of full sized images 2000 Kb

Thanks,
Carol


Gallery URL (optional): http://surfpix.net/gallery go to album Sunol and look at photo plum04-1F
Gallery version: G2B3
Webserver: Apache version: 1.3.27
Datatabase: MySQL4 4.1.9
PHP version: 4.3.10
phpinfo URL (optional): http://surfpix.net/phpinfo.php
Graphics Toolkit(s):
ImageMagick version: 5.77
GD version: bundled (2.0.28 compatible)
ImageMagick first in the toolkit list
Operating system: Windows XP Professional SP2
Web browser/version: Firefox 1.0.4
G1 version (for migration bugs): No G1, this is a fresh install of G2

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-07-05 22:48

I'm not able to duplicate this, even after setting my size limit settings to the same.

Can you move your phpinfo.php file into your gallery so we can be sure Gallery has at least 16MB of memory?

I'd also try updating to a currently nightly to see if the problem still exists, http://galleryupdates.jpmullan.com. There have been a lot of bug fixes and improvments since B3.

 
mattsson

Joined: 2005-07-02
Posts: 25
Posted: Wed, 2005-07-06 01:19

Thanks for having a look.

I've placed a copy of my phpinfo.php file into my gallery, so now in addition to running it from http://surfpix.net/phpinfo.php, you can run it from http://surfpix.net/gallery/phpinfo.php.

I've increased the memory_limit in my php.ini file to 20M. It had been set to 10M. I rebooted my virtual private server and tried the upload test of a small file again, no difference.

Thinking over what could be different between my config and yours, I noticed that I didn't have this problem when GD was my only graphics toolkit... but with that config large images (bigger than 900kb or so) wouldn't upload at all.

I will next try a current nightly build as you say. I can't remember if on Jun 28 when I installed Gallery, I had the latest nightly build or the Beta 3 from Source Forge. The code looks to be dated May 18. How could I tell for sure which version I have?

Thanks again for your help.

Cheers,
Carol

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2005-07-06 01:40

@ version: go to Site Admin > Maintenance > System Information.

Also, http://surfpix.net/gallery/modules/core/module.inc , has the version 0.9.17 in it. That was Beta 3, G2 is currently at 0.9.28.

 
mattsson

Joined: 2005-07-02
Posts: 25
Posted: Wed, 2005-07-06 02:29

Yes, it looks like I've just installed G2 version 0.9.28.

It looks like the install went smoothly. I can log in as admin but I can't add any albums, or do anything else from the left menu. That is, I can click on "add album," (which used to read add sub-album) but nothing happens, a little page refresh and the same screen reappears.

Lots of messages from debug mode, nothing that looks like an error to me. Nothing in the web server error log. I restarted the VPS, that didn't help.

The link from 'add album' goes to:

http://surfpix.net/gallery/v/?g2_navId=xeb61e9cd&g2_fromNavId=x99f43803&g2_navId=xeb61e9cd

So it appears I've got an entirely different problem now.

Can you still help me?

I have the same gallery config as before, except now site admin -> maintenance -> system information reads:

Gallery version = 2.0-beta-3+ core 0.9.27
PHP version = 4.3.10 apache
Webserver = Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/4.3.10
Database = mysql 4.1.9-standard-log
Toolkits = ArchiveUpload, Exif, Gd, Thumbnail, ImageMagick
Operating system = Linux moorepix.com 2.4.9-e.59 #1 Mon Jan 17 07:12:22 EST 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Thanks,
Carol

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2005-07-06 02:47

Just to be sure. Did you get any error or warning messages during the upgrade?

Go to Site Admin > Maintenance > Delete Template Cache

That should have happened during the upgrade, but it appears it didn't happen because you still have Gallery 2 - Beta 3:Bingo link at the bottom.

 
mattsson

Joined: 2005-07-02
Posts: 25
Posted: Wed, 2005-07-06 03:04

Yahoo! you are wonderful! I did the delete template cache and I can add albums again!!!!

I seem to remember some message in the upgrade about the template cache being deleted.

I did get warning messages in the first step of the upgrade about extra files existing that no longer were part of Gallery. Mostly they were the paularmstrongdesigns.com icons, but also the g2b3-bingo.png and g2b3-bingo.wav. I moved them to a temporary folder before proceeding.

Now that my gallery is working again, I will see if the upgrade has fixed the small picture upsize problem.

Thanks again so much.

Cheers,
Carol

 
mattsson

Joined: 2005-07-02
Posts: 25
Posted: Wed, 2005-07-06 05:52

Nivekiam, yes, the upgrade has fixed the small picture upsize problem. Now the smaller images are not upsized, but the larger images are still reduced... and I get thumbnails and watermarks. That is good!

Thanks again for all your help,
Carol

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2005-07-06 06:02

Good to hear it.