hi, making a small swing app to fool around with images. i would like to crop and transform from image into buffered image in a single operation. i want to do this in a model that is independent of the jcomponent.
i am creating a buffered image and using croppedImage.getGraphics().drawimage(originalImage,0,0,dx,dy,x+dx,y+dy,null); to crop followed by creating a second buffered image that does the affineTransform. the resulting image is then given to the panel to draw in it's paintComponent(); i would like to just create an image, but can;t figure out how to do that in the in model without using a jcomponent or toolkit. i am using an int rgb color model, but my images are mostly black and white line drawings (tiff images mostly).
perhaps the second transform should be done on the fly in the panel in it's paintComponent() method but that is a bit slow . otoh, when the images are big having extra copes requires -Xmx250M and the transform is slow.
i am guessing that the typical use case is to view the entire image zoomed out, then scale, flip, rotate and pan as desired, followed by a crop and zoom in to fill the screen. rinse until done. so i am not sure of what to keep around.
i am guessing that need to keep the entire image as an image as it is downloaded from an applet. then i would like to keep a cropped image around in the model, but can't figure out how to make a cropped image in a panel let alone without one.
any pointers would be appreciated.
thanks
--- ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work vice chair orange county java users group http://www.ocjug.org/ hate spam? http://samspade.org/ssw/
=========================================================================== 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".
