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

Username:   Password: 
 RegisterRegister   
 Transparency... Is it Possible??
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Homer_simpson




PostPosted: Wed Jul 02, 2003 3:06 pm   Post subject: (No subject)

hmmm... i think turing automatically turns 16ms too 256 colors i'm not sure... =/
Sponsor
Sponsor
Sponsor
sponsor
PaddyLong




PostPosted: Wed Jul 02, 2003 3:07 pm   Post subject: (No subject)

yeah... because even if you tried to use like RGB.AddColour and put it into the array... you would still need to use whatdotcolour.

of course, the other option would be to write a jpg decoder if you are know enough about jpgs to do so mehehe
Tony




PostPosted: Wed Jul 02, 2003 3:27 pm   Post subject: (No subject)

I though Turing (v4) loads .jpg Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
PaddyLong




PostPosted: Wed Jul 02, 2003 5:06 pm   Post subject: (No subject)

it does... but he wants 16m colour jpgs.. turing only does 256 colours
krishon




PostPosted: Wed Jul 02, 2003 5:28 pm   Post subject: (No subject)

it does? probably cuz i haven't used it in a while...when i made my game i had to use bitmaps...very, very old school...well not that old skool
Mazer




PostPosted: Wed Jul 02, 2003 8:33 pm   Post subject: (No subject)

you can load a picture in turing with as many colours as you want. you can draw that picture in turing without any colour loss. but if you want to do anything with the pixels that the picture is composed of, you'll only be using 256 colours. turing will just find the closest matching colour from the 256 palette. example:
draw a pic in turing (a 24bit bitmap for example). now go over every pixel in the picture using a double for loop and draw the pixel using whatdotcolour as the colour.

code:

% draw the picture at (0, 0)

for x : 0 .. picturewidth
    for y : 0 .. pictureheight
        drawdot (x, y, whatdotcolour (x, y))
    end for
end for


now you'll have the same picture except it's drawn in 256 colours. and quite likely to look quite ugly. maybe even fugly.
PaddyLong




PostPosted: Wed Jul 02, 2003 9:48 pm   Post subject: (No subject)

that's what I was talking about when I said

yeah... because even if you tried to use like RGB.AddColour and put it into the array... you would still need to use whatdotcolour.
netninja




PostPosted: Fri Feb 13, 2004 8:50 am   Post subject: (No subject)

I think .png's can have transperant backrounds, and that 'would' work in turing, but turing doesnt work with png's with now, Anyway, Ive seen someone in my school make a spaceship game like star trek, and the ships overlapped each other, and you couldnt see any leftover color from the spaceship, it was a solid ship, not a ship encased into a rectangle. I'll ask him as soon as possible how he did it. But I hope the future holds png support for turing, it would make our lives much easier.

One thing you could do to make part of your pictures transparent is, you could make a color transparent, by using the Pic.SetTransparentColor, which chooses the color thats transparent on the picture. Its prolly the easiest way, but ill ask that guy what he did anyway. So just draw your ship or character, and make the rest of the rectangle brightgreen for example, and declare that brightgreen is transparent. Lol, its a funny way of doing things although.

var shippic : int := Pic.FileNew ("ship.bmp")
Pic.SetTransparentColor (shippic, brightgreen)

Simple as that Very Happy, and ya, fer sure some of those other methods are defintely slow as hell.
Sponsor
Sponsor
Sponsor
sponsor
recneps




PostPosted: Fri Feb 13, 2004 4:08 pm   Post subject: (No subject)

Just go into wordperfect or word or whatever, and ceate a watermark on that page, then print screen key Very Happy then go in paint, and crop it down Wink
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 2 of 2  [ 24 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: