Jump to content

Recommended Posts

Posted

I have to use drawing and coloring methods in Java in a Java Applet to draw an image that looks almost exactly the same as this one:http://img3.wikia.nocookie.net/__cb20090802231620/sonic/images/a/a1/Shadow_26.png . My teacher will look at the code I used to draw the image. I'm trying as hard as I can but there's 'stuff' going on at home and I'm taking advanced classes. I'm trying to manage all the stuff, but it's getting hard. Can someone tell me a shortcut or help me out?

Posted

I don't have much experience with Java, but implementing such a thing shouldn't be so difficult. Just read through the image (it's 493 by 584 px), extract each pixel's RGB values, fill up a multidimensional array with those values accordingly, and pass it to whatever image display function you're using (with the data formatted in line with its standards).

Posted

I know how to do this with Python. It's something like this-

 

first you need an image manipulator and something like matplotlib so you can have it create the visual.

for item in knownpatterns:
		oneimage = item.split('your marker here (the thing that separates the label from the column of pixels)')
		pattern = oneimage[0]
		numbers = oneimage[1]
		knownbits = numbers.split('],')  #knownbits was transformed into a string so we can alter it into a list bit by bit
		newbits = im.split('],')

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.