QuestionAnswer Posted June 3, 2014 Posted June 3, 2014 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?
Sato Posted June 3, 2014 Posted June 3, 2014 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). 1
Popcorn Sutton Posted June 3, 2014 Posted June 3, 2014 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('],')
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now