11-23-2006, 08:56 PM
11-24-2006, 10:19 AM
Guest Wrote:Is there going to be a future version of yapb that can generates square thumbnails like flickr or pixelpost?
Hi Guest -
You don't need no future version of YAPB to generate square thumbs. The included phpThumb-Library can do that easely.
Greets from Salzburg,
Johannes
John
01-07-2007, 11:46 PM
Johannes Wrote:You don't need no future version of YAPB to generate square thumbs. The included phpThumb-Library can do that easely.
Hi Johannes,
thanks for that wonderful plugin.
A questions related to this topic: HOW are square thumbnails done via the phpThumb-Library? What settings must be changed and where?
Thanks in advance.
John
01-08-2007, 10:49 AM
Setting width and height to the same value? Eventually setting zc (zoom-crop to 1).
Example:
That should do it,
Didn't try it out though,
Johannes
Example:
Code:
<?php echo $post->image->getThumbnailHref(array('w=100','h=100','zc=1')); ?>That should do it,
Didn't try it out though,
Johannes
Guest
02-11-2007, 05:53 AM
Johannes Wrote:Setting width and height to the same value? Eventually setting zc (zoom-crop to 1).
Example:
Code:
<?php echo $post->image->getThumbnailHref(array('w=100','h=100','zc=1')); ?>
That should do it,
Didn't try it out though,
Johannes
How can i crop the image to show the center of the big image in thums?
02-14-2007, 10:15 PM
Guest Wrote:How can i crop the image to show the center of the big image in thums?
http://phpthumb.sourceforge.net/demo/doc...readme.txt
Greets from Salzburg,
Johannes
Guest
05-24-2008, 10:43 PM
I am incredibly stupid and utterly lost. I don't know where I should modify this stuff to make my thumbnails square. What is the name of the file I have to edit?
06-17-2008, 12:56 AM
I changed the code to
$image->getThumbnailHref(array('w=120','h=120','zc=1'))
and it still does not work. The generated thumbnail file for some reason still have the same dimension as the original file. The area that is not in the square specified appears to be transparent. Therefore, the image looks distorted if I applied height and width attribute on the img tag. This is one of the thumbnail from my cache directory. You can see that the visible area is square but the image itself is not.
![[Image: sample.gif]](http://ecosmo.org/photoblog/sample.gif)
Please let me know how to fix this.
$image->getThumbnailHref(array('w=120','h=120','zc=1'))
and it still does not work. The generated thumbnail file for some reason still have the same dimension as the original file. The area that is not in the square specified appears to be transparent. Therefore, the image looks distorted if I applied height and width attribute on the img tag. This is one of the thumbnail from my cache directory. You can see that the visible area is square but the image itself is not.
![[Image: sample.gif]](http://ecosmo.org/photoblog/sample.gif)
Please let me know how to fix this.
06-18-2008, 03:17 AM
Here is a list of some of the possible Parameters from the phpThumb Read Me file.
I have bolded the ones that may be able to do what you need.
===========
Parameters:
===========
src = filename of source image
new = create new image, not thumbnail of existing image.
Requires "w" and "h" parameters set.
[ex: &new=FF0000|75] - red background, 75% opacity
Set to hex color string of background. Opacity is
optional (defaults to 100% opaque).
w = max width of output thumbnail in pixels
h = max height of output thumbnail in pixels
wp = max width for portrait images
hp = max height for portrait images
wl = max width for landscape images
hl = max height for landscape images
ws = max width for square images
hs = max height for square images
f = output image format ("jpeg", "png", or "gif")
q = JPEG compression (1=worst, 95=best, 75=default)
sx = left side of source rectangle (default = 0)
(values 0 < sx < 1 represent percentage)
sy = top side of source rectangle (default = 0)
(values 0 < sy < 1 represent percentage)
sw = width of source rectangle (default = fullwidth)
(values 0 < sw < 1 represent percentage)
sh = height of source rectangle (default = fullheight)
(values 0 < sh < 1 represent percentage)
zc = zoom-crop. Will auto-crop off the larger dimension
so that the image will fill the smaller dimension
(requires both "w" and "h", overrides "iar", "far")
Set to "1" or "C" to zoom-crop towards the center,
or set to "T", "B", "L", "R", "TL", "TR", "BL", "BR"
to gravitate towards top/left/bottom/right directions
(requies ImageMagick for values other than "C" or "1")
bg = background hex color (default = FFFFFF)
bc = border hex color (default = 000000)
More at http://phpthumb.sourceforge.net/demo/doc...readme.txt
Cheers
Rog
Popcorn Photography
http://www.popcornphotography.com.au
I have bolded the ones that may be able to do what you need.
===========
Parameters:
===========
src = filename of source image
new = create new image, not thumbnail of existing image.
Requires "w" and "h" parameters set.
[ex: &new=FF0000|75] - red background, 75% opacity
Set to hex color string of background. Opacity is
optional (defaults to 100% opaque).
w = max width of output thumbnail in pixels
h = max height of output thumbnail in pixels
wp = max width for portrait images
hp = max height for portrait images
wl = max width for landscape images
hl = max height for landscape images
ws = max width for square images
hs = max height for square images
f = output image format ("jpeg", "png", or "gif")
q = JPEG compression (1=worst, 95=best, 75=default)
sx = left side of source rectangle (default = 0)
(values 0 < sx < 1 represent percentage)
sy = top side of source rectangle (default = 0)
(values 0 < sy < 1 represent percentage)
sw = width of source rectangle (default = fullwidth)
(values 0 < sw < 1 represent percentage)
sh = height of source rectangle (default = fullheight)
(values 0 < sh < 1 represent percentage)
zc = zoom-crop. Will auto-crop off the larger dimension
so that the image will fill the smaller dimension
(requires both "w" and "h", overrides "iar", "far")
Set to "1" or "C" to zoom-crop towards the center,
or set to "T", "B", "L", "R", "TL", "TR", "BL", "BR"
to gravitate towards top/left/bottom/right directions
(requies ImageMagick for values other than "C" or "1")
bg = background hex color (default = FFFFFF)
bc = border hex color (default = 000000)
More at http://phpthumb.sourceforge.net/demo/doc...readme.txt
Cheers
Rog
Popcorn Photography
http://www.popcornphotography.com.au
06-18-2008, 09:13 AM
Hi Emily -
Please give me a post-ID from one of your Image Postings so i may try it out directly over the YapbThumbnailer. You see that id if you edit one of your photoblog articles and have a look into the address of the page - The parameter "post" is the number i need to have look.
Yesterday i tried to repoduce this behaviour on my local installation and on my blog - unsuccessfully. Seems to be some unlucky combination on your host.
Greets from Salzburg,
Johannes
Please give me a post-ID from one of your Image Postings so i may try it out directly over the YapbThumbnailer. You see that id if you edit one of your photoblog articles and have a look into the address of the page - The parameter "post" is the number i need to have look.
Yesterday i tried to repoduce this behaviour on my local installation and on my blog - unsuccessfully. Seems to be some unlucky combination on your host.
Greets from Salzburg,
Johannes
emily Wrote:I changed the code to
$image->getThumbnailHref(array('w=120','h=120','zc=1'))
and it still does not work. The generated thumbnail file for some reason still have the same dimension as the original file. The area that is not in the square specified appears to be transparent. Therefore, the image looks distorted if I applied height and width attribute on the img tag. This is one of the thumbnail from my cache directory. You can see that the visible area is square but the image itself is not.
Please let me know how to fix this.
Guest
11-17-2008, 02:22 PM
The readme also says:
"Cropping images can be specified with either exact pixel
values for sx/sy/sw/sh parameters, or if those are set
to a value >0 and <1 then these are interpreted as a
percentage of the source image width/height. For example,
to crop 25% off all sides, you would specify parameters:
phpThumb.php?src=pic.jpg&sx=.25&sy=.25&sw=.5&sh=.5"
with the parameters:
"Cropping images can be specified with either exact pixel
values for sx/sy/sw/sh parameters, or if those are set
to a value >0 and <1 then these are interpreted as a
percentage of the source image width/height. For example,
to crop 25% off all sides, you would specify parameters:
phpThumb.php?src=pic.jpg&sx=.25&sy=.25&sw=.5&sh=.5"
with the parameters:
Code:
sx = left side of source rectangle (default = 0)
(values 0 < sx < 1 represent percentage)
sy = top side of source rectangle (default = 0)
(values 0 < sy < 1 represent percentage)
sw = width of source rectangle (default = fullwidth)
(values 0 < sw < 1 represent percentage)
sh = height of source rectangle (default = fullheight)
(values 0 < sh < 1 represent percentage)
zc = zoom-crop. Will auto-crop off the larger dimension
so that the image will fill the smaller dimension
(requires both "w" and "h", overrides "iar", "far")
Set to "1" or "C" to zoom-crop towards the center,
or set to "T", "B", "L", "R", "TL", "TR", "BL", "BR"
to gravitate towards top/left/bottom/right directions
(requies ImageMagick for values other than "C" or "1")11-17-2008, 09:00 PM
I'm not one for editing code as I typically wreck the params by forgetting a carrot or something. I much prefer modifying settings in the nice interfaces built for these plugins. In this case, I want to do what the perious person did, and that is create an archive page with indentically sized and cropped images that can be neatly arranged and not distracting. A nice grid of squares.
I too am having difficulty with the settings in the YAPB plug-in. It feels like the parameters listed in the previous posts in this thread are not included in the modification fields in either the Thumbnailer Options or the Automatic Image Insertion Options, unless I am misinterpreting. If I have to download the code in php form and edit, I will, but i think the Plug-in would be much stronger if it could include a filed for "Generate Square Thumbnail from Center Crop" option under "Archives"
I have run into this same question in numerous forums as I have been trying to find the answer, and yet I am still no close to the solution, save what I think is direction to modify the php code directly to get the desired result.
I too am having difficulty with the settings in the YAPB plug-in. It feels like the parameters listed in the previous posts in this thread are not included in the modification fields in either the Thumbnailer Options or the Automatic Image Insertion Options, unless I am misinterpreting. If I have to download the code in php form and edit, I will, but i think the Plug-in would be much stronger if it could include a filed for "Generate Square Thumbnail from Center Crop" option under "Archives"
I have run into this same question in numerous forums as I have been trying to find the answer, and yet I am still no close to the solution, save what I think is direction to modify the php code directly to get the desired result.
11-18-2008, 07:02 PM
Guest Wrote:Johannes Wrote:Setting width and height to the same value? Eventually setting zc (zoom-crop to 1).
Example:
Code:
<?php echo $post->image->getThumbnailHref(array('w=100','h=100','zc=1')); ?>
That should do it,
Didn't try it out though,
Johannes
How can i crop the image to show the center of the big image in thums?
Where in the phpThumb file is this code added specifically? That php file is difficult for me to follow.