LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-25-2005, 01:24 AM   #1
EnigmaX
Member
 
Registered: Jul 2003
Distribution: Fedora Core 4
Posts: 107

Rep: Reputation: 15
Strange problem reading bitmaps


This is quite odd I'd think...
I used to have a slackware distribution on my computer here at home (ext2 fs), and I read about loading bitmaps and they loaded fine; the tutorial files from nehe compiled fine, and ran smoothly. However, on my new distribution, Gentoo x86_64, reiser_fs, files are loaded incorrectly and slightly off. It's off slightly, not by much, as some fields are correct.

So, the question is, what is causing the same files, the same makefiles, to compile differently? (I know its not the filesystem because that fs ran fine at my school computer, which used slack/reiserfs)

If I ran the files I had on my old system from my backup, they run fine... they read the bitmap fine, etc... but If I recompile them on this system (The source from the tutorials, not stuff I wrote), it still reads information wrong. Heres an example of the information being read incorrectly after being compiled

Data at Offset: 171798691894
Width of Bitmap: 256
Height of Bitmap: 1572865
Error: number of Planes not 1!

Heres what it should be:
Data at Offset: 54
Width of Bitmap: 256
Height of Bitmap: 256
Bits per Pixel: 24
Size of the image data: 196608
 
Old 06-25-2005, 11:08 AM   #2
randyding
Member
 
Registered: May 2004
Posts: 552

Rep: Reputation: 31
Between your old and new systems are you compiling for 2 different processor architectures, where one is 32 and the other 64, or maybe PPC/Intel that have an endian change?

Quote:
on my new distribution, Gentoo x86_64
If you are recompiling from 32 to 64 bit, that's what the problem is. Longs go from 4 bytes to 8 bytes. If the program doesn't take that into account it may malfunction.

Last edited by randyding; 06-25-2005 at 01:00 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
strange reading from console comand ps -l mark001 Linux - General 2 10-28-2005 07:28 PM
LILO Bitmaps Murdock1979 Slackware 3 09-13-2005 04:11 PM
Konqueror cd reading problem bearwood Linux - Software 0 11-09-2004 02:27 AM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 05:16 PM
sensors reading strange results on a Gigabyte GA-K8N Ian.hill Linux - Hardware 0 04-13-2004 03:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration