How do I save without the white background?

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
Dragon_of_death_
Posts: 4
Joined: Tue May 15, 2007 1:50 pm

How do I save without the white background?

Post by Dragon_of_death_ »

So what I'm trying to do it take this tree desgin and put it in photoshop but When I save it and load it in photoshop it has that white background and I can't get rid of it. And yes I tried just using the magic wand tool in photoshop didn't select the branches. So I was wondering if there was a way to save JUSt the tree or something like that

Pure Pandemonium
Posts: 2
Joined: Tue May 15, 2007 5:05 pm

Post by Pure Pandemonium »

Perhaps try selecting the white background and deleting it? Photoshop ought to leave a transparent background then, with only the tree remaining. If there are still white bits sticking to your tree when you put it in something else, play with the feather settings on the magic wand when you select the white.

Edit: I am new to Context Free and just found the wiki. It looks like you can make the background transparent. See the Background directive article. I think the line you want is

background { a -1 }

Dragon_of_death_
Posts: 4
Joined: Tue May 15, 2007 1:50 pm

Post by Dragon_of_death_ »

Oh thanks :D

bh2
Posts: 3
Joined: Tue Oct 10, 2006 12:57 am
Location: Oxford, England
Contact:

Post by bh2 »

You could also save as svg... then you can have any background you want.
Beware though... these files can be huge.

ocelot
Posts: 1
Joined: Tue Dec 11, 2007 1:49 pm

Post by ocelot »

Where abouts in the code do you put the background command? I keep getting errors.

I'm just trying it out on the examples, where would I background {a -1} in this code?
startshape SEED1

rule SEED1 {
SQUARE{}
SEED1 {y 1.2 size 0.99 rotate 1.5 brightness 0.03}

}

rule SEED1 0.05 {SEED1 {flip 90}}

rule SEED1 0.05 {
SQUARE{}
SEED1 {y 1.2 s 0.99 r 1.5 b -0.5 flip 90}
SEED1 {y 1.2 x 1.2 s 0.6 r -60 b -0.5}
SEED1 {y 1.2 x -1.2 s 0.5 r 60 b -0.5 flip 90}
}

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn »

Code: Select all

startshape SEED1
background {a -1}
... 

nyomythus
Posts: 3
Joined: Tue Sep 02, 2008 5:02 pm

backgrounds

Post by nyomythus »

I've been getting different background colors, in a roundabout way, by employing the .svg format and then importing it into Adobe Illustrator; of course here you can draw a box, give it s color, and push the box to the background; Illustrator and Photoshop are perfectly compatible, voila.

Oh yeah, and scaling down the right-click 'save size' to something like 250/250.

I just started playing with the program -- love it!!!!!!!!

But I wish there was a dictionary of sorts to describe the abbreviations.

Post Reply