FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   Transparent gifs
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Transparent gifs  (Read 1092 times)
jhv2

WWW
Transparent gifs
« on: May 15th, 2004, 2:28am »

Hi All,
 
I saw a string from last year announcing that transpaernt gifs have been worked into Processing 58.  I'm on 68, and I just can't figure out how to get my transparent gifs to work.
 
this is the applet I made...
 
http://pantheon.yale.edu/~jhv2/SunClock/ClockProblem.html
 
any ideas out there?
 
Thanks for your time,  
 
Jason
 
Sprak

20070562007056 WWW
Re: Transparent gifs
« Reply #1 on: May 18th, 2004, 9:24pm »

I presume only the shadows are GIF's? One solution is that you could draw the shadows with processing instead of using GIF's. You could make them all semi-transparent and neat too. This doesn't solve the problem with GIF's not being transparent, but yeah... without knowing more..
 
ess

Email
Re: Transparent gifs
« Reply #2 on: May 18th, 2004, 10:30pm »

entire images can be made tranparent to varying degrees with tint() but as for having specific pixels interpreted as tranparent (which is built into the gif compression) I think processing just makes them white like alot of other programs.
 
mKoser

WWW Email
Re: Transparent gifs
« Reply #3 on: May 18th, 2004, 10:58pm »

i am not sure what you expect to get from the transparent gif?...  
 
i've posted a small example here:
http://beyondthree.ascii33.com/_test/gif/
 
which show a standard jpg-image as background with a standard transparent gif on top (following the mouse) ... the gif is nothing fancy, just standard photoshop export.
 
the images are here:
http://beyondthree.ascii33.com/_test/gif/bg.jpg
http://beyondthree.ascii33.com/_test/gif/trans.gif
 
...if you want 8-bit alpha, you have to do some more jumping through hoops to get there... You'd have to create a seperate BGImage object, read the pixels from the original image, read the brightness values of the original image, and then combining those two reading into one BImage. (don't have an example offhand, but that's the theory!)
 
+ mikkel
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
jhv2

WWW
Re: Transparent gifs
« Reply #4 on: May 21st, 2004, 4:56am »

Geez guys...
 
You all were pretty right, and it got so frustrating, I just decided to draw the hands myself.  Everything is/was great.
 
Unfortunately, now that I have the program going, when I hit the "Export" button, the web-page that is created loads, but doesn't display the applet.  Check it out here...
 
http://pantheon.yale.edu/~jhv2/SunClock/sunclock6/index.html
 
This is all the more frustrating because when I hit the "Play" button, it looks & runs GREAT.
 
I'm looking at other peoples posts on the subject and their solutions involve throwing out folders and renaming files... why
 
Thanks for ya'll's comments,
 
Jason
 
Update - I've tried starting new files, other browsers, etc.  no dice... hmmm.
« Last Edit: May 21st, 2004, 5:39am by jhv2 »  
JohnG

WWW
Re: Transparent gifs
« Reply #5 on: May 21st, 2004, 3:24pm »

Thankfully, the Java VM I use has a console window, and there's an error printed in it when I view your applet:
 
Java(TM) Plug-in: Version 1.3.1_02
Using JRE version 1.3.1_02 Java HotSpot(TM) Client VM
 
<...stuff...>
 
could not load image Face4.jpg
Error while running applet.
java.lang.NullPointerException
 
 at BGraphics.flat_image(BGraphics.java:3211)
 at BGraphics.image(BGraphics.java:4202)
 at BApplet.image(BApplet.java:2813)
 at SunCLOCK_6a.drawFace(SunCLOCK_6a.java:117)
 at SunCLOCK_6a.loop(SunCLOCK_6a.java:61)
 at BApplet.nextFrame(BApplet.java:473)
 at BApplet.run(BApplet.java:407)
 at java.lang.Thread.run(Unknown Source)
 
 
Are you putting your images in the code folder, so they get compiled into the .jar file?
 
Pages: 1 

« Previous topic | Next topic »