473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

bmp file issues

I am reading in a bitmap file using the microsoft bmp classes and most
all of the files are as follows

Width :640:
Height :480:
Bits :8:
Upside Down :1:
Core :0:
Palette Size :256:
Compression :0:

and are indexed images. Using fread and fseek to pull off the header
and start reading at the first pixel. When I get the indexed pixel
values and compare them to values in Photoshop they do not match. I
have read that bitmaps are "upside down". Do I need to flip things
around? I am assuming the header is 1077 bytes (0x0 through 0x436).

Thanks
Aug 18 '08 #1
2 1755

"steve" <St******************@gmail.comwrote in message
>I am reading in a bitmap file using the microsoft bmp classes and most
all of the files are as follows

Width :640:
Height :480:
Bits :8:
Upside Down :1:
Core :0:
Palette Size :256:
Compression :0:

and are indexed images. Using fread and fseek to pull off the header
and start reading at the first pixel. When I get the indexed pixel
values and compare them to values in Photoshop they do not match. I
have read that bitmaps are "upside down". Do I need to flip things
around? I am assuming the header is 1077 bytes (0x0 through 0x436).
You are probably reading the palette as raster data / not adding padding
bits at the end of each line.

If you go to my website there is a portable BMP loader, under "Basic
Algorithms".

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Aug 18 '08 #2
On Mon, 18 Aug 2008 10:18:17 -0700 (PDT), steve
<St******************@gmail.comwrote:
>I am reading in a bitmap file using the microsoft bmp classes and most
all of the files are as follows
C supports classes?
>
Width :640:
Height :480:
Bits :8:
Upside Down :1:
Core :0:
Palette Size :256:
Compression :0:

and are indexed images. Using fread and fseek to pull off the header
and start reading at the first pixel. When I get the indexed pixel
values and compare them to values in Photoshop they do not match. I
have read that bitmaps are "upside down". Do I need to flip things
around? I am assuming the header is 1077 bytes (0x0 through 0x436).
And your question about the C language (as opposed to your program
logic) is?

--
Remove del for email
Aug 18 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Tom Willis | last post by:
I'm trying to get pylint running on windows and the bat file for it seems a little screwy. I'm hoping someone may have figured this out already. rem = """-*-Python-*- script @echo off rem...
0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
2
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
6
by: Sebastian Kemi | last post by:
How should a write a class to a file? Would this example work: object *myobject = 0; tfile.write(reinterpret_cast<char *>(myobject), sizeof(*object)); / sebek
6
by: moonriver | last post by:
I write a program accessing files in network drive o:. It is doable as a standalone application. However, if it is running under windows service, the following exception will appear: 13/07/2004...
6
by: martin | last post by:
Hi, I have noticed that every aspx page that I created (and ascx file) has an assosiated resource file aspx.resx. However what I would like to do is have a single global resource file for the...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I cut and paste the following code from msdn help page which it just introduces view and multiview server controls. Here is what I do: in vs studio 2005, File --New Web Site, it...
5
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a .Net web service that converts the MODCA files to tif or png file format. This web service runs on a 2003 server. This web service first copies the MODCA file to be converted to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.