make resize height larger

wise_mike

Joined: 2008-10-21
Posts: 158
Posted: Wed, 2013-09-11 01:23

The images auto resize 640px, and this goes to both the width and height..

I need to keep the width as is, but make the height 1500 for example.

There is in the "Advanced settings" an option for the default 640 "resize_size", but it works for width and height.

I found in the modules/gallery/helpers/gallery_installer.php these lines:

Quote:
// Add rules for generating our thumbnails and resizes
graphics::add_rule(
"gallery", "thumb", "gallery_graphics::resize",
array("width" => 200, "height" => 200, "master" => Image::AUTO),
100);
graphics::add_rule(
"gallery", "resize", "gallery_graphics::resize",
array("width" => 640, "height" => 640, "master" => Image::AUTO),
100);

I think changing the "height" => 640 to what I need should work, but the file is named "gallery_installer", how to activate the change after editing the file? if it does the trick in the first place.

Thanks,

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-09-11 02:42
Quote:
I need to keep the width as is, but make the height 1500 for example.

So you want to change the aspect ratio of the resized image?
I'm not understanding what you are after here.
There is two modules for thumbs (square and rectangle)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
wise_mike

Joined: 2008-10-21
Posts: 158
Posted: Thu, 2013-09-12 18:01

not the "thumbs", I need the "resizes" to be max width 640, and max height 1500, instead of the current 640. There are three sizes of the image: original, resize, thumb. I am talking about the resize.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-09-12 20:27

Your guess is as good as mine as to where to look to change the code.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
wise_mike

Joined: 2008-10-21
Posts: 158
Posted: Thu, 2013-09-12 21:45

I found now there is something in the table "graphics_rules", column "args":

Quote:
a:3:{s:5:"width";i:640;s:6:"height";i:640;s:6:"master";i:2;}

If I change the height here for example 5640, it changed an image (330x1730) making the width 640, and enlarged the height with the aspect ratio! Although I didn't change anything in the width.. it should be keep the image as is (330x1730), as long as the height is less than the "5600", it should keep the width as it is.

I need now to know where can I make the width anything with a max of 640, and keeps all that are less as they are..

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-09-12 22:06

The 5 in

Quote:
a:3:{s:5:"width";

is the number of characters in the word width.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
wise_mike

Joined: 2008-10-21
Posts: 158
Posted: Mon, 2013-10-07 23:33

sorry I didn't follow you here.. what's that got to do with resizing? can you explain it to me so I can try it out?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-10-08 03:35
Quote:
what's that got to do with resizing?

Nothing. I was pointing out the 5 in:

Quote:
a:3:{s:5:"width";i:640;s:6:"height";i:640;s:6:"master";i:2;}

is serialized php and the 5 is the number of characters in the work 'width'. 6 would be the number of characters in 'height' and 'master'.

Your guess is as good as mine as to where to look to change the code.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-10-08 03:39

Can't you accomplish what you are after with css max width?
http://jsfiddle.net/ErNeT/

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team