How about filter a image file(.jpg) with a rect In Java

azureshow
azureshow used Ask the Experts™
on

I want to make a java program that uses
               a rect(int x,int y,
                       int width,
                       int height)
 to filter a image file(for example a jpg file). Let the the part of rect I want displayed only and outside of the rect be hidden.

Thanx in advance
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Java Developer
Top Expert 2010
Commented:
g.drawImage(image,
   0, 0, width-1, height-1,
   x, y, x + width - 1, y + height - 1,
   Color.black, null);
Mick BarryJava Developer
Top Expert 2010

Commented:

Author

Commented:
Thank you very much for your answer.

  And what about using a circle to filter a image file(for example a jpg file). Let the the part of the circle I want displayed only and outside of it be hidden.
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Mick BarryJava Developer
Top Expert 2010

Commented:
Thats a bit trickier :)
Are you using Java 1 or Java 2?

Author

Commented:
I am using Java 1.3.2, is Java 2 necessary? I can intall it then.
Mick BarryJava Developer
Top Expert 2010

Commented:
1.3.2 is Java 2.
Mick BarryJava Developer
Top Expert 2010

Commented:

Author

Commented:
Thanx, i will try.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial