> // assuming: > Image src; > int subx, suby, subw, subh; > // then execute: > BufferedImage snap = > new BufferedImage(subw, subh, TYPE_INT_RGB); > Graphics2D g2d = snap.createImage(); > g2d.drawImage(src, -subx, -suby, null); > g2d.dispose(); > // snap is now a snapshot of subx,y,w,h of src
OK; thanks. > If you didn't want a snapshot, I can outline other > ways, but I'm > guessing that this is probably what you wanted...? Yep. What allowed you to know that TYPE_INT_RGB was the correct parameter to pass in the BufferedImage constructor? If it helps, I know that the source image often has an alpha value set. Would I use TYPE_INT_RGBA in this case? Thanks again for helping this newbie out. Best, Laird [Message sent by forum member 'ljnelson' (ljnelson)] http://forums.java.net/jive/thread.jspa?messageID=295232 =========================================================================== 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".
