aspose file tools*
The moose likes Beginning Java and the fly likes Pixels and Pictures Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Pixels and Pictures" Watch "Pixels and Pictures" New topic
Author

Pixels and Pictures

Lora Tully
Greenhorn

Joined: Nov 29, 2004
Posts: 8
Hello everybody. Great to be here! Everyone seems really nice in here and I hope I have nicer time here then other forums I been too hehe Anyway onto my program. I am just a casual Java programmer, sad I know hehe and I havent done anything like this in school or anything but as a keen programmer its fun to try new languages. I was playing around with Java and I thought I would mess about with pictures and images. Now I created a few black and white images in JPEG format. I was hoping to makes a silly little program that would count how many black pixels and how many white pixels but found this to be quite harder then I thought it would be. I heard of using the pixel grabber or something but I dont really know how to get started. Can anyone help me please? Thank you!

All the best
Lora
xxx
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Have you looked at java.awt.Image yet? If not, that would probably be a good place to start. java.awt.image.PixelGrabber might also be helpful.

These links are part of the Java API documentation. You should familiarize yourself with these docs and learn how to navigate them. They are a great tool to find the methods that you need, or to remind yourself what parameters and return types are used by a particular method that you are already familiar with. Note that the Java API docs are not a tutorial, though. Still, they are handy for reference. If you want tutorials to get you started on particular subjects, Sun (the makers of Java) provide some here. There are also other available online resources, too, but I'll let you google for those.

Keep coding!

Layne


Java API Documentation
The Java Tutorial
Bob Frapples
Ranch Hand

Joined: Mar 08, 2002
Posts: 32
Search for uses of BufferedImage. Lost of code/examples out there. Used for low-level image manipulation. Might check out VolitileImage as well, as it's newer and makes use of hardware acceleration.
Basanth P Rangadhol
Greenhorn

Joined: Nov 22, 2004
Posts: 13
yeh.. Layne is wright.. if your not familiar with image classes.. then better to go thru.. also.. in 1.4 there is awhole set of package..
javax.ImageIo.. which has an ImageIO class which takes care of reading and writing image file.. and i have not gone thru the "plugin" classes.. to decompress "*.jpg" files...


still lot more....


Imagination is more important than knowledge - Einstien.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pixels and Pictures