Hmms, perhaps the sheering ability would help there of the Graphics2D ? I think this task is hard to do, I could imagine of two main ways:
1) write your own filter algorithm that transforms the image into the 'corridor' image - but this is heavy duty work. or 2) split the image into stripes - i.e. ten stripes, then scale the stripes with different (increasing) scaling factors and 'overlap' them a bit. This should be more or less easy to do and would perhaps do the trick. it might be that it doesn't look perfect 8especially where the scaled stripes are connecting, but hey, you can do it in more stripes). I think this would work - and if you just adapt the number of stripes required to teh size of the original image, this should work. And it should not be much slower than the scaling of the full image. The efforts to implement are not that high. Just an idea. > Hello, > > I'm trying to resize an image (jpg) before drawing it to the graphics2d. But > I need to apply greater ratio of resize to one of the sides of the image. > > supposing the original 4 corner points of the image are > (10,10) (30,10) (30,20) (10,20) > the normal 2X resize (and translation) would give > (10,10) (50,10) (50,30) (10,30) > > but the resize I'm intended to do, keeping the left edge of the image size > intact and resizing to right would result in > (10,10) (40,0) (40,30) (10,20) > > the porpouse is to give the feeling of "entering" a corridor. Beign the > images like the walls of the corridor. > > I can't use 3D graphics, must do it with 2d > best regards > Jonathan > > =========================================================================== > 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". =========================================================================== 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".
