Resizing Images That Are Too Large?

FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 07:24

Hello,

I recently installed Gallery 3.1 and what i want to do is to be able to upload a bunch of my pictures. However some of these pictures are over 1MB is size they can range from 2-5MBs. These files are way too large to be uploaded. I am wondering if there is an addon or something I am missing to have Gallery convert the image to a smaller file size and then place it in my gallery.

Any feedback or help is greatly appreciated!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 14:22

Are you looking for something to make it smaller before uploading or something to resize images after upload?
http://codex.gallery2.org/Gallery3:Modules:max_size
____________________________________________
Like Gallery? Like the support? Donate now!

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 16:51

Either way as long as it left the original files alone on the computer so it doesnt mess with the original image. I have installed the max_size module but it doesnt seem to do anything.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 17:01

More detail. Did you check the advanced settings:

from the page I linked to above wrote:
limits the size of the image to 1024 (default) pixels on a side. This can be configured using the Advanced setting section.

How big are your images, not file size, but dimensions?

Are the images actually being uploaded? This comment is to vague:

Quote:
However some of these pictures are over 1MB is size they can range from 2-5MBs. These files are way too large to be uploaded.

Does that mean you are not able to upload them or you don't want images that large on your site?

If you are not able to upload them to your site, then you're running into limitations set for your PHP configuration:
FAQ: Why can't I upload big files (over a megabyte or two)?

Also change from GD to ImageMagick under Admin > Settings > Graphics

If that all fails, you'll need to process them before uploading and resize them yourself. I personally use Irfanview www.irfanview.com as it has come pretty good batch processing options.
____________________________________________
Like Gallery? Like the support? Donate now!

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 17:16

ok i will try what you say and respond. It appears some arent even being uploaded because of the file size. I will make those changes and see what happens.

Thanks

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 17:27

If you're still having problems post a link to phpinfo:
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 17:30

i activated ImageMagik it appears but it says the directory for it can be found in /usr/bin/ and i logged into my ftp to see if there was a directory in my gallery folder like that and there is none. Is it located somewhere else or am i missing it?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 17:34

Gallery doesn't contain the ImageMagick binaries. Those are stored at /usr/bin on your host. /usr would be at the root of the file system. If Gallery finds it and can use it, it means your host properly installed ImageMagick and are not doing some other stupid things. So all in all, this is a good thing. ImageMagick will work better for images than GD.
____________________________________________
Like Gallery? Like the support? Donate now!

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 17:39

I dont see a /usr in the main folder? i installed Gallery 3.1 yesturday i never did a seperate install for ImageMagik, does imagemagik come with gallery 3.1 or are there files i need to get?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 17:44

Don't worry about it. If Gallery found it, it's on the system. If you're logging in via FTP (use SFTP) you probably can't access that location anyway.

It's not the main folder of your site or anything under your user account. It's a main directory of the server. It's like "c:\users" or "c:\documents and settings", but instead it's /usr

http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

____________________________________________
Like Gallery? Like the support? Donate now!

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 17:48

ok well if thats activated are there settings i need to change to get it to compress the file size of images that are too large?

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 17:51

also i looked at the php.ini and the htaccess files and both already said max upload size of 20M, so large images should already have worked

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 17:52

Read this:
FAQ: Why can't I upload big files (over a megabyte or two)?

And this:

nivekiam wrote:
If you're still having problems post a link to phpinfo:
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 18:00
 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 18:05

just an added note, it appears on my site when i go to upload the photo, it appears to upload the photo to 100% but then the photo never appears. (it also reads upload successful)

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 18:19

post_max_size is 8M and upload_max_filesize is 2M

Try renaming the php.ini that ships with G3, it's not being loaded anyway.

You're running into file size limits. As far as the flash uploader is able to tell, the file is uploaded successfully. That's one problem with php's limit for the file sizes. The entire file still has to be uploaded to the server before it can tell you, nope, it's no good. :)

Post back or check your phpinfo after you've deleted the php.ini file.

If that doesn't fix it and with us already trying to increase those limits in .htaccess, though IIRC if php runs as a CGI (like yours) php_value isn't obeyed from .htaccess. You'll need to contact your host about increasing those limits

OR use a program like irfanview as I posted above and resize the images before uploading.
____________________________________________
Like Gallery? Like the support? Donate now!

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 18:23

you just want me to rename the php.ini thats in the gallery folder, and then try uploading a big image? or do i have to replace that php.ini with something else

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 18:25

if thats what i was suppose to do i just tried it and still doesnt work

 
FoulPlay

Joined: 2011-03-11
Posts: 12
Posted: Fri, 2011-03-11 18:30

you are correct thought, i converted a picture that was like 3.4MBs to being 1.7MBs and it worked fine, if only i could increase that max upload from like 2-5 id be set, but at the same time i also wish itd convert the files into smaller file sizes

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-03-11 18:40

Ask your host
____________________________________________
Like Gallery? Like the support? Donate now!