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

Username:   Password: 
 RegisterRegister   
 Bitmaps with negative height values
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Insectoid




PostPosted: Sat Feb 15, 2014 3:46 pm   Post subject: Bitmaps with negative height values

Does Turing properly display bitmaps with negative height values? OSX saves all bitmaps with negative heights and it's the only reason I can think of that would cause the issue I'm having. I've tried drawing this particular image as JPG and GIF, but the BMP format won't work. Can someone drawing it in Turing to see if it's an issue on my end or with Turing itself?


dirt.bmp
 Description:
 Filesize:  122.12 KB
 Viewed:  1851 Time(s)

dirt.bmp


Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Sat Feb 15, 2014 3:59 pm   Post subject: RE:Bitmaps with negative height values

Nope. Draws nothing. Scaling it to the same size show that only one row of pixels is even loaded it looks like.

Turing:

var picId := Pic.FileNew ("C:\\Users\\Admin\\Downloads\\dirt_158.bmp")
put Pic.Width (picId)
put Pic.Height (picId)
var scaledPicId := Pic.Scale (picId, abs (Pic.Width (picId)), abs (Pic.Height (picId)))
Pic.Draw (scaledPicId, maxx div 2, maxy div 2, picCopy)


Posted Image, might have been reduced in size. Click Image to view fullscreen.
Insectoid




PostPosted: Sat Feb 15, 2014 4:09 pm   Post subject: RE:Bitmaps with negative height values

Damn. Oh well, thanks anyway.
Raknarg




PostPosted: Sun Feb 16, 2014 10:08 pm   Post subject: RE:Bitmaps with negative height values

What are negative values supposed to do?
Insectoid




PostPosted: Sun Feb 16, 2014 11:00 pm   Post subject: RE:Bitmaps with negative height values

Bitmaps with positive height values are stored upside-down in ram. Bitmaps with negative values are stored right-side-up.
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: