BufferedImage should take size of raster...
843807Feb 7 2007 — edited Feb 14 2007If I make a BufferedImage(320,240, TYPE_<ANYTHING>) then setRaster(r) where the width and the height if the raster is different from the width and height of the BufferedImage, the BufferedImage doesn't take on the width and height of the raster. It stays what it was went it was created.
For example: if the raster is created with a width of 100 and a height of 100, the bufferedImage I made above stays 320 x240 when bufferedImage.setRaster(r) s called.
This causes problems later when trying to drawImage(). To be able to draw the bufferedImage to fill the drawing area, one needs to either scale() the drawing or do complicated arithmatic to calculate the drawImage() parameters.
It would be a whole lot simpler if the BufferedImage would just take the width and height of a new raster.
Anybody have any comments??? Maybe I'm just looking at my problem wrong. I want to draw a bufferedImage to fill the drawing area -- scaling the image on the fly to fit.