Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offset get values #10

Closed
GoogleCodeExporter opened this issue Sep 7, 2015 · 5 comments
Closed

offset get values #10

GoogleCodeExporter opened this issue Sep 7, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 11 has been merged into this issue.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant