This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-06-07 18:55:45

msturt
Scratcher
Registered: 2007-06-06
Posts: 1

Importing drawing objects from other programs.

I have been trying to draw some sprites from other programs that have more drawing tools (nothing fancy, just MSWord.  Now trying other programs).  When these are imported, I see that the objects do not have a transparant background but instead have a white background.  This is not good when I have a non-white stage background, for example.  Is there a workaround?  I have some other issues about imported drawing objects, but this is the main one.  Thank you.

Offline

 

#2 2007-06-07 20:13:52

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Importing drawing objects from other programs.

I use Photoshop Elements to draw, scale, and clean up sprites.  It can represent transparency  (at least in GIF format).  It can add transparency to existing sprites with the magic eraser, or by designating one of the colors in the color map as transparent.

Offline

 

#3 2007-06-08 11:42:28

DrJim
Scratcher
Registered: 2007-05-26
Posts: 100+

Re: Importing drawing objects from other programs.

Scratch seems to do a nice job of reading .png images with "alpha level" transparency.  This is nice if you want to use the same image in Alice, since that is what that program prefers.  If you don't have a graphics program that supports this type of file and transparency, however, (say you only have MS Paint) this doesn't help much. 

What I have been doing when I use MS Paint is just to pick any color as a transparent background (preferably one quite different from the dominate colors in your image so you can see the edges of your image clearly), importing into Scratch, and then using the bucket replace tool to replace the background color with "transparent."

A couple of questions on exports (using the options brought up with a right click):

    1. All images seem to come out in .gif format and 8 bit color - but I haven't found a color to RGB mapping that seems to work.  I assume this is some sort of "web safe" pallet - could someone give me a reference.  Also, is it safe to always use an RGB value of 0, 0, 0 for "transparent" in GIF images?
    2. When you export .wav files, do they always have the same parameters (sample rate, 8/16-bit, stereo/mono) or does that depend on the initial file used in the project?

Any other helpful information on image and sound file export would be appreciated.

Offline

 

#4 2007-06-08 12:08:07

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Importing drawing objects from other programs.

(0,0,0) is black, and so is not a safe color for transparency.

I noticed that Scratch makes this mistake (of treating the first color on a gray-scale palette as transparent rather than black when I first tried importing the background for my rubber-stamp program
http://scratch.mit.edu/projects/kevin_karplus/11530

I ended up having to force white to be transparent in Photoshop Elements, then filling the white back in in Scratch.

Offline

 

#5 2011-05-08 23:25:30

MikeKucinski
Scratcher
Registered: 2010-11-03
Posts: 7

Re: Importing drawing objects from other programs.

If it's a costume you can edit the costume and then any large white areas can be made opaque by paint filling with the invisible selection for the color.

Check out this  drawing project
http://scratch.mit.edu/projects/helmethair4/1774336
Use the E key to change patterns.  Use the X key to clear the screen.

Offline

 

#6 2012-09-09 10:39:58

Starglow
New Scratcher
Registered: 2012-07-05
Posts: 3

Re: Importing drawing objects from other programs.

I'm sorry, but .png images get filled with a random color background and don't come up with transparency when I import them in Scratch. I would recommend saving the costumes as .gif files, because the bucket-fill isn't very good and will leave blotches of background color. Scratch accepts transparency from .gif files.

Offline

 

Board footer