Ted,
Sorry I can't explain the details of what's happening, but if you'd like
more control/flexibility in how the edges are handled, you might want to
check out the JAI API. It supports the concept of image boundary extension
to provide extra source pixels for computing destination pixels.
Quoting Ted Hill <[EMAIL PROTECTED]>:
> Thanks Micha,
>
> The scaling works for me, I have no problem with that.
>
> What I want to know is what Java is doing along the edges when bilinear
> interpolation is specified.
>
> For example, in my 5 x 25 example below, if I turn interpolation off and
> use
> a screen magnifier, I can see columns which are 5 pixels wide and all of
> uniform color/shade.
>
> However, when I switch the interpolation to bilinear, the columns are
> no
> longer of uniform color/shade (as is expected), they 'blend' evenly
> across
> the image from one column to another.
>
> I understand that the 'inner' columns are 'blends' of their surrounding
> pixels.
>
> But on the far left and right edges, where there are only 'original'
> pixels
> to one side or the other, I'm not sure how the color/shade is
> determined.
>
> For example, if the original 5 x 25 image is scaled by 5 in the x
> direction
> resulting in a 25 x 25 image, I would have expected that the first 3
> columns
> of pixels on the left in the resulting image would either be
>
> 1. all of uniform color/shade
> 2. a blend of the 'original' single pixel column with their background
> to
> the left.
>
> but my screen magnifier shows that neither is the case.
>
> Does anyone know what algorithm the 2D API uses along the edges when
> using
> bilinear interpolation and scaling for a buffered image?
>
> Thanks,
>
> Ted Hill
--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech <http://www.dotech.com/>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".