* Thus wrote Chris:
> Marek Kilimajer wrote:
> 
> >Chris wrote --- napísal::
> >
> >>Hi there, I've looked in many places but have not found any clues on 
> >>how to work around this problem.
> >>
> >>I'm using imagecopyresampled to resize an image  and crop part of it 
> >>at the same time. The area I need to crop, unfortunately, is 
> >>sometimes a float, which leads to my problem. imagecopyresampled does 
> >>not accept float values, and interpolate the images. (Well, 
> >>technically it accepts them, but just converts them to an integer 
> >>internally)
> >>
> >>The source image is 63x63 pixels ($rImg1).  The destination image is 
> >>100x100 pixels ($rImg2).
> >>
> ...
> > 
> >So, what are you trying to achieve?
> >
> If I resized the image to 100,611x100,611, cropped it to 100,000, and 
> then resized it to 100x100 it would achieve the effect I want. It's very 
> difficult for me to explain, but I'll try.
> 
> It's very similar to the interpolation done on the inner pixels.  It's 
> taking the values of all pixels that 'touch' the new pixel, and meshing 
> them together, basically, shifting the pixels 0.3055 to the right  would 
> overlap old and new pixels partially. I'll try a grayscale example (it's 
> a bit simpler).

Woah.. that way to much math for my brain at the moment :) 

If I understand the situation properly you need to take a smaller
image and make it the boundary for the larger image?? I might
suggest looking at imagick, it is a bit more friendlier with image
manipulation:

  http://pecl.php.net/package/imagick


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to