Questions tagged [bmp]

The BMP File Format, also known as Bitmap Image File or Device Independent Bitmap (DIB) file format or simply a Bitmap, is a Raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems.

The BMP File Format, also known as Bitmap Image File or Device Independent Bitmap (DIB) file format or simply a Bitmap, is a Raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems.

More information at Wikipedia page of BMP

1091 questions
62
votes
13 answers

Writing BMP image in pure c/c++ without other libraries

In my algorithm, I need to create an information output. I need to write a boolean matrix into a bmp file. It must be a monocromic image, where pixels are white if the matrix on such element is true. Main problem is the bmp header and how to write…
den bardadym
  • 2,747
  • 3
  • 25
  • 27
27
votes
2 answers

When I add a Splash Screen using Launch4j, I get a Startup Error ("An error occurred while starting the application")

I noticed that Launch4j's GUI seems to prefer a bmp file, so I used Gimp to convert my jpg file into that format, but I kept getting the error when trying to run the executable generated by Launch4j.
GregNash
  • 1,316
  • 1
  • 16
  • 25
25
votes
3 answers

C#: How to convert BITMAP byte array to JPEG format?

How can I convert a BITMAP in byte array format to JPEG format using .net 2.0?
Marc
  • 9,012
  • 13
  • 57
  • 72
23
votes
2 answers

Why are bmps stored upside down?

Why are BMP images stored upside down and zero-padded so they are four-byte aligned?
bobobobo
  • 64,917
  • 62
  • 258
  • 363
23
votes
3 answers

png to bmp in C#

is there anyway that I can convert a png to a bmp in C#? I want to download a image then convert it to a bmp then set it as the desktop background. I have the downloading bit and the background bit done. I just need to convert the png to a bmp.
Shuttleu
  • 243
  • 1
  • 2
  • 6
19
votes
5 answers

How to load a bmp on GLUT to use it as a texture?

I've been searching all around for a simple solution to add sprites to my OpenGl GLUT simple moon lander game in c++ and it appears I must use bmp's since they're easiest to load and use them as textures on a rectangle. How exactly can I load the…
Patricio Jerí
  • 528
  • 2
  • 5
  • 15
19
votes
3 answers

Creating a BMP file (bitmap) in C

I'm trying to make a bitmap in C, just from code. I'm currently trying to make a very easy .bmp image, with a height of 1px and a width of 4 pixels, with all white pixels. I have read the format description and tried to apply it. This resulted in…
Devos50
  • 2,025
  • 4
  • 25
  • 56
17
votes
5 answers

cannot convert parameter 1 from 'char *' to 'LPCWSTR'

Im trying to load a BMP file AUX_RGBImageRec *LoadBMP(char *Filename) // Loads A Bitmap Image { FILE *File=NULL; // File Handle if (!Filename) // Make Sure A Filename Was Given { …
dactz
  • 187
  • 1
  • 1
  • 5
16
votes
5 answers

ImageIO.write bmp does not work

I'm trying to save an image in bmp format, but it doesn't create any file. If I use "png" instead, everything works fine. Any ideas? //This works fine: ImageIO.write(bi, "png", new File("D:\\MyImage.png")); //This does not work: ImageIO.write(bi,…
Jakob Mathiasen
  • 1,267
  • 3
  • 15
  • 18
14
votes
4 answers

How do I create a BMP file with pure Python?

I need to create a black and white BMP file with pure Python. I read an article on wikipedia, BMP file format, but I am not good at low level programming and want to fill this gap in my knowledge. So the question is, how do I create a black and…
Taras Bilynskyi
  • 1,403
  • 3
  • 10
  • 9
14
votes
1 answer

Bitmap file header size

I'm a newbie in programming bmp files and i checked this web site to learn about bmp header.. http://www.daubnet.com/en/file-format-bmp it seems that the header of a bmp file is 54 bytes. Using paint, i created a simple 10x10 image, and i saved it…
user1657743
  • 141
  • 1
  • 2
  • 5
13
votes
6 answers

read pixel value in bmp file

How can I read the color value of 24bit BMP images at all the pixel [h*w] in C or C++ on Windows [better without any 3rd party library]. I got Dev-C++ A working code will be really appreciated as I've never worked on Image reading & have come to SO…
Sourav
  • 17,065
  • 35
  • 101
  • 159
13
votes
6 answers

How to draw 32-bit alpha channel bitmaps?

I need to create a custom control to display bmp images with alpha channel. The background can be painted in different colors and the images have shadows so I need to truly "paint" the alpha channel. Does anybody know how to do it? I also want if…
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49
13
votes
5 answers

Padding in 24-bits rgb bitmap

could somebody explain to me why in 24-bit rgb bitmap file I have to add a padding which size depends on width of image ? What for ? I mean I must add this code to my program (in C): if( read % 4 != 0 ) { read = 4 - (read%4); printf(…
salieri
  • 131
  • 1
  • 1
  • 3
13
votes
4 answers

Can a .BMP file be stored in an HTA (HTML/VBScript)?

I've noticed in a backup of my FireFox bookmarks that the icon which is displayed to the left of each entry is held as a character stream in the A tags. For example: ICON="data:image/png;base64,iVBOR [data removed to shorten example] …
user2303217
1
2 3
72 73