Pages (2): 1 2   
Member
Member
Alenonimo   2006-12-25, 00:16
#1

In the [i]zp-config.php[/i] we have this:

Quote:`

// Default thumbnail size and scale:

// If $thumb_crop is set to true, then the thumbnail will be a centered portion of the image

// with the given width and height after being resized to $thumb_size (by shortest side).

// Otherwise, it will be the full image resized to $thumb_size [b](by shortest side)[/b].

// NOTE: thumb_crop_width and height should always be less than or equal to thumb_size

`
Shouldn't be scaling by [b]longest[/b] side? The thumbs became a mess when scaling this way. At least it should be an option.

Developer
Developer
trisweb   2006-12-31, 19:49
#2

You're right, it should be an option. When I move to a new admin system, I'll make an options panel with a good interface for defining what thumbs should look like by default...

Junior Member
Junior Member
TonySoprano   2007-03-17, 18:52
#3

`

// Default thumbnail size and scale:

// If $thumb_crop is set to true, then the thumbnail will be a [b]centered portion[/b] of the image

// with the given width and height after being resized to $thumb_size (by shortest side).

// Otherwise, it will be the full image resized to $thumb_size (by shortest side).

// NOTE: thumb_crop_width and height should always be less than or equal to thumb_size

`

I'd need that the thumb is not generated from centered portion, but from top portion. What do I have to edit in i.php to achieve this?

thanks!

Developer
Developer
trisweb   2007-03-18, 02:01
#4

I would edit the theme files, not i.php -- change the image printing function into getCustomThumbURL or something like that. Take a look at the Stoppeddesign theme included with Zenphoto to see how that's done.

Member
Member
davegreenwood   2007-04-04, 10:33
#5

This thumb scaling by shortest side is a bit of a problem for me too. Does anyone know a hack to get it to work by longest side, maybe change the order of division in the appropriate function?

Member
Member
Tak   2007-11-12, 01:27
#6

I'm also looking to scale thumbnails by the longest side of the image as well. I'm using 1.1.2. Scaling by the shortest side is giving me some really awkward looking thumbnails... and I don't really like the cropped ones.

Member
Member
Tak   2007-11-19, 08:01
#7

Is there any chance that there's a "quick fix" for this? I've already tried looking at the code myself... but honestly, math just makes my eyes cross.

Member
Member
Tak   2007-12-08, 08:54
#8

-pokes at things with a stick-

Member
Member
sbillard   2007-12-08, 18:20
#9

Tak:

Have you tried Trisweb's suggestion?

Member
Member
Tak   2007-12-20, 01:36
#10

I've looked at the function "getCustomThumbURL" in the theme Stopdesign - with it I know I can print custom sized thumbs... but how do I get them to scale by the longest side, and not simply crop? I don't want cropped thumbnails, and I'd like them to scale by the longest side, not the shortest. That's the problem I'm having.

Member
Member
Member
Tak   2007-12-20, 22:17
#12

Thanks for that link. I did the code changes, only it appears to have fixed nothing for me. Do I have to change something specific in my theme as well?

Gallery URL: http://shriker.ca/archive/design/ *

  • Has two examples of really long thumbnails that I wish were scaled properly.

Current version ZenPhoto 1.1.3.
Theme: default

image display options

  • Image size: 595
  • Images size is longest size: checked
  • Thumb size: 130
  • Crop thumbnails: not checked
  • Crop thumbnail width: blank
  • Crop thumbnail height: blank

I've also tried clearing my thumbnail cache, but those particular thumbs keep on coming back the same way.

Member
Member
AlexWilson   2007-12-21, 04:55
#13

try putting in 130 for Crop thumbnail width and Crop thumbnail height

Member
Member
Tak   2007-12-22, 21:38
#14

That worked. Thanks!

Member
Member
benjancewicz   2008-01-02, 22:32
#15

This may be a related problem...

I'm trying to get my thumbnails to not be cropped at all, so that the user can preview the entire image as a miniature before clicking it and opening it full size.

Right now my gallery crops the image to a square in the middle of the image. How do I do this?

Member
Member
sbillard   2008-01-03, 01:03
#16

Reset the "crop Thumbnails" option.

Member
Member
benjancewicz   2008-01-03, 02:47
#17

I did. No love.

Here's what I have:

Image Quality: 100
Thumbnail Quality: 100
Image Size: 800
Images size is longest size: On
Allow upscale: Off
Thumb size: 100
Crop thumbnails: On
Crop thumbnail width: 100
Crop thumbnail height: 100

This is what it looks like:

http://zerflin.com/ZenPhoto/index.php?album=works

Member
Member
sbillard   2008-01-03, 02:58
#18

If you have crop thumbnails on, they will get cropped. Reset means not checked.

Member
Member
benjancewicz   2008-01-03, 04:54
#19

It doesn't change anything (I had it off to begin with). See, now it's off and it looks the same: http://zerflin.us/ZenPhoto/index.php?album=works

Member
Member
sbillard   2008-01-03, 05:37
#20

OK, something got screwed up along the way.

In functions.php in the function getImageParameters the first line of code now reads:
$thumb_crop = ('thumb_crop');
is should read:
$thumb_crop = getOption('thumb_crop');

We will get this fixed in a nightly build shortly.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.