rifanece / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

offset get values #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
hi,

i'm adding some additional function to have the possibility to shift the
zoom croped result image vertical a later maybe horizontal too.

added line 34: 
$zoom_crop_offset_y = preg_replace( "/^[1-9][0-9]*$/", "", get_request(
'zcoy', 0 ) );

modification an line 365:
$cachename = get_request( 'src', 'timthumb' ) . get_request( 'w', 100 ) .
get_request( 'h', 100 ) . get_request( 'zc', 1 ) . get_request( 'q', 80 ) .
get_request( 'zcoy', 0 );

add line 92:
$offset_y = $zoom_crop_offset_y;

and mod line 108:
$src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 ) + $offset_y;

all done with less knowhow, and a much try and error and very much google :-)

enagble to set a &zcoy=value (pixels) can my positiv or negative value to
shift the croped result verticaly

Original issue reported on code.google.com by michael.lauermann@gmail.com on 23 Nov 2008 at 11:55

GoogleCodeExporter commented 8 years ago
Interesting idea - moving the crop area around would be a nice feature but it 
reduces 
the automation idea. I shall keep it in mind for the future though as i can see 
a few 
uses for something like this.

Original comment by BinaryMoon on 9 Jan 2009 at 8:39

GoogleCodeExporter commented 8 years ago
i used timthumb with crop to get a image area with the full with and only 20% 
of the
hight. based on the http://theunstandard.5thirtyone.com/ theme but my images 
are only
visual eye catcher and only the croped version is showed on the single post 
page and
the user has the visual association. now some images didn't looked best when the
croped area has been centered and now i can 'shift' the croped area up and down 
:-)
without my 'offset' the cropping ist still centered

Original comment by michael.lauermann@gmail.com on 9 Jan 2009 at 10:14

GoogleCodeExporter commented 8 years ago
Hi michael,

I tried adding the code you supplied above the the latest release of timthumb 
but
think it has changed since you first posted. i am currently designing a new 
site and
using timbthumb for images and require an offset function to show the top of the
image rather than the centre. can anyone help out with this code or refer me to 
the
verison of timthumb michael used originally so i can modify it.

Much appreciated.

Original comment by themest...@gmail.com on 27 Apr 2009 at 5:38

GoogleCodeExporter commented 8 years ago
Went with a different method but TimThumb finally has the ability to move the 
crop location around so I will mark this as fixed.

Original comment by BinaryMoon on 29 Aug 2010 at 9:45

GoogleCodeExporter commented 8 years ago
Issue 11 has been merged into this issue.

Original comment by BinaryMoon on 29 Aug 2010 at 9:46