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

Username:   Password: 
 RegisterRegister   
 GIFs that turing accepts
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Fenrisulfr




PostPosted: Tue Apr 21, 2009 7:03 am   Post subject: GIFs that turing accepts

Not sure whether this belongs here so move if at wrong place

Anyways, I had a spritesheet, cutted it up and made it into a gif with transparent background with photoshop CS3. Unfortuantely everytime I try to load it it crashes with entire program without any messages. Its not overly long, only 9 frames, and not very big either...
My friend suggested saving the gif with another program. something about uncompressing it so it will work in turing. Any ideas for what that program might be?
Sponsor
Sponsor
Sponsor
sponsor
TheGuardian001




PostPosted: Tue Apr 21, 2009 9:38 am   Post subject: Re: GIFs that turing accepts

As far as I know, Turing has little to no support for GIFs at all. you will need to take each frame as a .bmp or .jpg (or maybe png) and load them individually. check the help file for supported file types.
Tony




PostPosted: Tue Apr 21, 2009 10:51 am   Post subject: RE:GIFs that turing accepts

There have been a few successful attempts at getting Turing to use GIFs, you should search around in Submissions for that, but it's flaky at best. I think you'd get better results if you loop through the frames yourself.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DemonWasp




PostPosted: Tue Apr 21, 2009 10:56 am   Post subject: RE:GIFs that turing accepts

From the Turing documentation on Pic.FileNew():

Turing Documentation wrote:
For, multi-frame GIF files (GIF files that have several frames or pictures and are used for animation), Pic.FileNew will only load the first frame. See the Pic.FileNewFrames and Pic.Frame for information on loading and displaying a multi-frame GIF file.
tjmoore1993




PostPosted: Thu Apr 23, 2009 7:36 pm   Post subject: RE:GIFs that turing accepts

Turing was discontinued and therefor had no compatibility with GIF support. There is a way though to achieve what you want to do and it is fairly simple.

Turing:

var Frame1 : int := Pic.FileNew ("Picture/Frame1.bmp") % Defined frames
var Frame2 : int := Pic.FileNew ("Picture/Frame2.bmp")
var Frame3 : int := Pic.FileNew ("Picture/Frame3.bmp")

Pic.SetTransparentColour (Frame1, 3) % This sets the transparency of Frame1, Frame2, and Frame3.
Pic.SetTransparentColour (Frame2, 3)
Pic.SetTransparentColour (Frame3, 3)


    Draw.Cls
    Pic.Draw (Frame1, x, y, picMerge) % Draws Frame1 at Location (x, y) and merges the picture so that you do not see background
    delay (250)
    Draw.Cls
    Pic.Draw (Frame2, x, y, picMerge)
    delay (250)
    Draw.Cls
    Pic.Draw (Frame3, x, y, picMerge)

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  [ 5 Posts ]
Jump to:   


Style:  
Search: