This site requires JavaScript, please enable it in your browser!
Greenfoot back
NJoson
NJoson wrote ...

2012/3/27

Creating custom GIFs for Greenfoot??

1
2
NJoson NJoson

2012/3/27

#
So I've been using Greenfoot for some time now and I always have the same issue: The images provided by Greenfoot don't exactly fit my needs. And all the images off the Internet are either too large or too small. So my question is: What is the best way to make my own images to suit my own purposes?
danpost danpost

2012/3/27

#
Are you aware of the GreenfootImage method 'scale(int, int)'? (Check it out) BWT, only use this method on 'new GreenfootImage(String filename)' as multiple scaling ruins the image.
Morran Morran

2012/3/27

#
You can also make your own images using Paint or Gimp and then transfer the new image files to your scenario's "images" folder. You can also alter images to suit your needs, like tinting or scaling your images to the way you like.
Builderboy2005 Builderboy2005

2012/3/28

#
Even Paint can yield surprisingly good results if you put enough time into making the pictures :) Just take a look at my Nightmare scenario, all of the graphics were made using Paint, and sometimes Gimp to touch them up.
NJoson NJoson

2012/3/28

#
danpost wrote...
Are you aware of the GreenfootImage method 'scale(int, int)'? (Check it out) BWT, only use this method on 'new GreenfootImage(String filename)' as multiple scaling ruins the image.
If I were to use the scale(int, int) method, where would I do it? Within the world() class or the actor() class??
danpost danpost

2012/3/28

#
Usually, in the constructor of the Actor or in a method that the constructor calls. But, can also be in a method that updates the image. Really, anywhere you have an actor, whose image you want to change the size of, create a new instance of the image, scale it, and set the image of the actor to it.
Builderboy2005 Builderboy2005

2012/3/28

#
Also, something to note about the scale() method, is that it is really only needed when your image is going to be dynamically scaled to many different sizes. Otherwise, a program like paint can easily change the size of your image permanently without any need for code at all.
dlanni dlanni

2012/3/28

#
That is really great that we can do so much in Paint cause Gimp is scary ( but fun to play with) and graphics are such a major part of having fun with Greenfoot. My problem in Paint is cutting out the image. Whenever I use the loose lasoo to capture an image I get a message saying that all transparency will be lost. Regular selects always have all that white space around them. There must be a simple way to say " Save only what is not the background color(usually white)", but so far, I am stymied. If I select what I've just drawn, lets say an apple, I can click into the body of the apple and move it around, but when I get to the edge of the page, the apple dissapears and I am left with a rectangle of white with an apple sized hole in it. Any ideas about how to select and save images of irregular shape? ( I've read the help and watched tutorial videos but this simple move is still a mystery).
danpost danpost

2012/3/28

#
@dlanni, the image will always be saved as a rectangular shape. So, what you really want, is to say "Make the background color fully transparent", which, of course, means gobbledy-gook to paint. I find myself using Greenfoot to 'trace' the polygon of the shape and then setting the exterior of the shape to color(0, 0, 0, 0).
Builderboy2005 Builderboy2005

2012/3/28

#
Indeed, one of my most common image methods is a method that goes through an image and turns all while pixels into transparent pixels, although converting the images into PNG and using GIMP to add transparency is also a viable option.
matt.milan matt.milan

2012/3/28

#
steps to do transparency 1. make image in whaetver program you like 2. open finished image in gimp 3. click layer(top bar, middle) 4. click transparency 5. click add alpha channel 6. use fuzzy select tool 7. click on the white-space of yuor image (the outside part, that you want to cut) 8. hit delete if a grey checkerboard appears around your image, you've successfully added a transparency and cropped appropriately. now save your file as a .png, and if gimp gives you an error saying to export, go ahead and export it, leaving subsequent options and keep pressing ok, do it, gimme mah picture (i made that last one up that's not a real button) until u get a new file with.png extension.
danpost danpost

2012/3/28

#
So, that what GIMP stands for 'GImme Mah Picture'!
matt.milan matt.milan

2012/3/28

#
lol dan, you just won the thread i wonder what the devs of GIMP would say about that
mjrb4 mjrb4

2012/3/29

#
Just to throw in my £0.02 - I've found Paint.NET (if you're using Windows) much friendlier / easier to work with generally than GIMP if you wanted to give that a try.
Denzien Denzien

2012/3/29

#
Any image editor really, Paint.net is a good free one, I personally use Photoshop, but not everyone has that.
There are more replies on the next page.
1
2