File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Swing / AWT / SWT
Joined: Nov 13, 2008
May 06, 2012 08:50:44
How to show just part of image - if I want to cut my image in 4x4 squares? And I want to show only a single square?
Is there a net way to do it?
--Always, Grega from Peace refuge
Joined: Oct 27, 2005
May 06, 2012 09:23:19
You can use
// to crop Image image ImageFilter filter = new CropImageFilter(0, 0, 50, 50); FilteredImageSource source = new FilteredImageSource(image.getSource(), filter); Image cropped = Toolkit.getDefaultToolkit().createImage(source);
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: java images
Writing Image Bytes on Response Stream
Modifying the ImagePicker Controller
img tag does not display image
Adjusting image size to image label
how to remove unwanted pixels from image
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014