AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Point me to the right API? (java image manipulation)

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Duane Morin
Guest





PostPosted: Wed Nov 24, 2004 4:22 pm    Post subject: Point me to the right API? (java image manipulation) Reply with quote



Perhaps somebody can point me in the right direction and give me a
kick to get me started. I'm normally a serverside guy so I dont muck
with the graphics libraries much at all.

What I want to do is start with an image file, break it into a grid of
NxN, and then shuffle those pieces randomly. Kind of like a
15-puzzle. I'm not looking for somebody to write it for me, and it's
not homework Smile. I'm just wondering what the state of the image APIs
is lately and where I should look? Can I manipulate an image directly
like this, or should I be looking more for something that renders it
first and then reclaims it piece by piece like mini screenshots?

THanks very much!
Back to top
Andrew Thompson
Guest





PostPosted: Wed Nov 24, 2004 4:56 pm    Post subject: Re: Point me to the right API? (java image manipulation) Reply with quote



On 24 Nov 2004 08:22:42 -0800, Duane Morin wrote:

Quote:
..I'm normally a serverside guy so I dont muck
with the graphics ..

Check the GUI FAQ and associated group..
<http://www.physci.org/codes/javafaq.jsp#cljg>

Quote:
..libraries much at all.

What I want to do is start with an image file, break it into a grid of
NxN, and then shuffle those pieces randomly. Kind of like a
15-puzzle. I'm not looking for somebody to write it for me, and it's
not homework Smile. I'm just wondering what the state of the image APIs
is lately and where I should look?

BufferedImage.getSubimage() would seem a good way to get your tiles.

Follow the links in the GUI FAQ for image manipulation examples.
<http://www.cs.uu.nl/wais/html/na-dir/computer-lang/java/gui/faq.html>

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane

Back to top
Steve W. Jackson
Guest





PostPosted: Wed Nov 24, 2004 5:32 pm    Post subject: Re: Point me to the right API? (java image manipulation) Reply with quote



In article <60428b02.0411240822.1cab4cde (AT) posting (DOT) google.com>,
[email]dmorin (AT) gmail (DOT) com[/email] (Duane Morin) wrote:

Quote:
:Perhaps somebody can point me in the right direction and give me a
:kick to get me started. I'm normally a serverside guy so I dont muck
:with the graphics libraries much at all.
:
:What I want to do is start with an image file, break it into a grid of
:NxN, and then shuffle those pieces randomly. Kind of like a
:15-puzzle. I'm not looking for somebody to write it for me, and it's
:not homework Smile. I'm just wondering what the state of the image APIs
:is lately and where I should look? Can I manipulate an image directly
:like this, or should I be looking more for something that renders it
:first and then reclaims it piece by piece like mini screenshots?
:
:THanks very much!

I'm by no means highly graphically literate, so I'm not going to claim
I've got the best advice... :-)

But a quick look at the JavaDocs shows a pretty handy collection of
features in the java.awt.image package, among others. You should easily
be able to find classes there which can take the image, once read from a
file, and break it into parts you can manage separately. One idea that
comes to my mind initially is doing something to separate the various
squares of the original image into separate images that you may be able
to store to offscreen Graphics2D objects, for instance, and then render
each one in its appropriate location on another component as you
shuffle, respond to user actions, etc. It might even be fun to
experiment, if I had lots of time.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.