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

2011/6/14

On creating images

danpost danpost

2011/6/14

#
I have noticed that a lot (if not all) the images downloaded from Greenfoot are NOT rectangular in shape. That the image is the shape of what it portrays. But, if I edit the image, my new image is always rectangular. I get a box around my image that I do not want. How do I avoid getting that box? By the way, I am using Paint. Should I be using something else? And if so, what?
DonaldDuck DonaldDuck

2011/6/15

#
Microsoft paint does not support transparency. For good, free image editing programs, I recommend GIMP. There is also a bunch of online editing programs. You just need to make sure that the empty space around the image is set to a transparent color. Photoshop does this with ease, but it's quite an expensive program. If you just want to resize the default green foot images, you can use the scale method. getImage().scale(int x, int y) will resize the actors image to a given size in pixels, so that can also be quite handy. Hope this was helpful!
danpost danpost

2011/6/15

#
DonaldDuck, thank you very much for your input (it is as I thought, especially about Paint). I am, therefore, in need of Photoshop or GIMP or an online editing program. Hey, I fortunately do have Microsoft Photo Editor! I will use it! Thanks again. I remember reading about some new image modifying commands in Greenfoot 2.1.0. Would you know exactly how they work? Or, is there a way to change the current image by XOR'ing it with a pattern?
DonaldDuck DonaldDuck

2011/6/16

#
Er, I personally don't use greenfoot image modifiers often. So I don't know a bunch about them. I know you can draw ovals, rectangles, lines, and such, but I don't know about XOR'ing the image with a pattern. Sorry!
mjrb4 mjrb4

2011/6/16

#
Personally I use paint.net (free on windows and I prefer it to GIMP), the magic wand tool can select all the white and delete it. You also need to make sure you save to a format like PNG that supports transparency (JPEG doesn't.) What do you mean by XORing the image with a pattern? Are you talking about encrypting it in some way?
danpost danpost

2011/6/16

#
It is not an encryption. It is a boolean operation that compares two values and the result is the same as what you get when you 'OR' the values, except that two trues become false. Basically, equivalent to 'one or the other, but not both: OR XOR TRUE FALSE TRUE FALSE TRUE true true false true FALSE true false true false With values, the tables above just need 'TRUE's changed to 'ON' and 'FALSE's changed to 'OFF'. Then compare the powers of two to see if there part of the values. (The BASIC programming language has commands that alter the images using these parameters, plus other ways).
davmac davmac

2011/6/17

#
XOR is not the inverse of OR. It is the "eXclusive OR", that is, it excludes the case where both operands are true. The correct truth table is: TRUE FALSE TRUE false true FALSE true false
danpost danpost

2011/6/17

#
My bad! I forgot the 'X' was for exclusive. Thank you, davmac! (I've corrected mine, in case anyone sees it and does not see your correction)
You need to login to post a reply.