Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing 4.1 and Transparent GIFs
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
andrew.




PostPosted: Thu Jun 26, 2008 5:56 pm   Post subject: Turing 4.1 and Transparent GIFs

Hi guys,

I was wondering about Turing 4.1 and partially transparent GIFs. I have made an image that is a gradient, but the gradient is about 80% opaque. I have saved it to a GIF file with dithering enabled (to have some sort of transparency as CS2 does not allow it without dithering). Anyways, my problem is that Turing does not read the GIF file properly. It shows up all grey with no other colours and no transparency whatsoever. Is it possible, to have partial transparencies within Turing? Also, if not, is it possible to have Turing process transparencies (not Pic.SetTransparentColor)? For instance, if I wanted to draw a box, can I store it as an image and have it 80% opaque?

Thanks guys
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Jun 26, 2008 6:16 pm   Post subject: RE:Turing 4.1 and Transparent GIFs

I don't think GIFs even have alpha-transparency. Let alone having that work in Turing.

You could draw an alpha-transparent image by mixing your own RGB values. For every color of RGB (so all 3 of them), find a point between background and foreground that is 80% towards the foreground.

For example, if your background is pure black (0,0,0) and your image is a certain shade of pink (200,0,100), then an 80% opaque image would be (160, 0, 80)

Though you'd likely wouldn't be able to draw your images this way anywhere close to real-time.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
SNIPERDUDE




PostPosted: Sat Jun 28, 2008 12:44 pm   Post subject: RE:Turing 4.1 and Transparent GIFs

hmm, using RGB you can make something semi transparent so you can see the underlayer, but like Toni said there is no way of doing this close to real-time.
andrew.




PostPosted: Sun Jun 29, 2008 1:56 pm   Post subject: RE:Turing 4.1 and Transparent GIFs

Yeah, I know you can't do this in real-time with Turing. I've tried before using the same method. But anyways, thanks. I guess I could just have it solid.
SNIPERDUDE




PostPosted: Mon Jun 30, 2008 5:39 pm   Post subject: RE:Turing 4.1 and Transparent GIFs

OR do it once, screenshot it, then draw this new image solid.
It all depends on the situation...
[Gandalf]




PostPosted: Mon Jun 30, 2008 9:19 pm   Post subject: Re: RE:Turing 4.1 and Transparent GIFs

SNIPERDUDE @ 2008-06-30, 5:39 pm wrote:
OR do it once, screenshot it, then draw this new image solid.
It all depends on the situation...

However, in that case you couldn't take into account changing backgrounds, since the screenshot would be static. And if your background doesn't change, then there's no need for alpha transparency in the first place because you could use a non transparent image to produce your gradient effect. Smile
SNIPERDUDE




PostPosted: Tue Jul 01, 2008 6:13 pm   Post subject: RE:Turing 4.1 and Transparent GIFs

makes sense.
andrew.




PostPosted: Thu Jul 10, 2008 6:03 pm   Post subject: RE:Turing 4.1 and Transparent GIFs

This is my workaround:

I take an image of the area of what I want to be partially transparent (Pic.New) and then I draw a grid over it with whatever colour I want it to be and then I use Pic.Blur to blur it. The result is something similar to Vista's blurred title and taskbar.
Sponsor
Sponsor
Sponsor
sponsor
SNIPERDUDE




PostPosted: Thu Jul 10, 2008 8:17 pm   Post subject: RE:Turing 4.1 and Transparent GIFs

That works. Kind of like the old method to blur things except blured.

You have a scrrenshot?
andrew.




PostPosted: Fri Jul 18, 2008 9:23 am   Post subject: Re: Turing 4.1 and Transparent GIFs

Here is a screenshot. I was making a Vista-like OS, but it's on the backburner now.

Posted Image, might have been reduced in size. Click Image to view fullscreen.
Click here for a higher quality BMP file.

The only file outside of the Turing files is the background, which can be changed and renamed because I have JPG file detection in my program.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: