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
8
votes
3 answers

Getting the pixel value of BMP file

i got a question for reading an bmp image. How can i get the pixel value(R, G, B values) in an bmp image? Can anyone help me using the C programming language?
user239468
  • 225
  • 3
  • 6
  • 10
8
votes
2 answers

Load HBITMAP from *.bmp file in Win32 project

Is it possible to load a *.bmp file into a HBITMAP in a Win32 project, using only WINAPI functions?
sashoalm
  • 75,001
  • 122
  • 434
  • 781
8
votes
3 answers

Load RGBA bitmap with PIL

I tried to convert a 32-bit Bitmap to 32-bit PNG using PIL. from PIL import Image im = Image.open('example.bmp') print im.mode # it prints 'RGB', but expected was 'RGBA' im.save('output.png', format='PNG') The expected image mode is 'RGBA', but…
stanleyxu2005
  • 8,081
  • 14
  • 59
  • 94
8
votes
1 answer

Efficiency of Using PNG's vs. BMP's With Large Files

I've written a mapping program in Delphi where the user can load a raster image in the background which I store in memory. In one case the user loaded a 44MB BMP successfully but the program was sluggish and when they printed (I tile the output)…
Mitch
  • 335
  • 1
  • 3
  • 10
7
votes
2 answers

How I create bmp files (bitmaps) of a single color using delphi

I need a fast way to create 24 bits bitmaps (and save to a file) in runtime,specifing the Width , Height and color something like procedure CreateBMP(Width,Height:Word;Color:TColor;AFile: string); and call like…
Salvador
  • 16,132
  • 33
  • 143
  • 245
7
votes
4 answers

How to determine an image's encoding

I have an image with a PNG extension. I suspect it's not really a PNG though (I think it might be a GIF). How can I confirm an image's encoding? NB: A solution for Windows would be preferable
BanksySan
  • 27,362
  • 33
  • 117
  • 216
7
votes
1 answer

BMP File line padding issue

So I'm trying to export a .bmp file in C++ code, and I have it working except for one major thing: line padding. I'm not 100% sure on how line padding works, but I know I need it. My algorithm works except for the padding, I manually added padding…
null
  • 548
  • 2
  • 6
  • 17
7
votes
1 answer

Converting 32 bit bmp to 24 bit

I have a System.Drawing.Image screenshot file. I cast it to bmp, but the problem is that it makes a 32 bit bmp, while I need a 24 bit one. How can I convert it to 24?
Tyler Durden
  • 2,031
  • 4
  • 20
  • 25
7
votes
5 answers

C++: Convert text file of integers into a bitmap image file in BMP format

I have a text file being saved by a matrix library containing a 2D matrix as such: 1 0 0 6 0 4 0 1 1 Where each number is represented with a colored pixel. I am looking for some insight as to how I'd go about solving this problem. If any more…
Louis93
  • 3,843
  • 8
  • 48
  • 94
6
votes
2 answers

Display BMP in JLabel

Java can display png, jpg a some other picture formats, but i have to display a bmp file in a JLable by getting the file path. ImageIcon imageIcon = new ImageIcon(imageFile.getAbsolutePath()); ImageIcon support the typical png,gif,jpg images. In…
Markus Lausberg
  • 12,177
  • 6
  • 40
  • 66
6
votes
3 answers

How to create a thumbnail of .BMP file?

I use imagecreatefromjpeg, imagecreatefromgif, and imagecreatefrompng functions to create thumbnails of image/jpeg, image/gif, and image/png mimes. I would like also to create thumbnails of .BMP files. I checked one file and found out that its mime…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
6
votes
6 answers

converting images to indexed 2-bit grayscale BMP

First of all, my question is different to How do I convert image to 2-bit per pixel? and unfortunately its solution does not work in my case... I need to convert images to 2-bit per pixel grayscale BMP format. The sample image has the following…
yy502
  • 313
  • 1
  • 3
  • 11
6
votes
2 answers

How to set an Icon in NSIS install (CMake)

The documentation for CPACK_PACKAGE_ICON is very limited on cmake wiki page. The following is not working for me (as per): set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/images/MyIcon.bmp") include(CPack) It leads to: File:…
malat
  • 12,152
  • 13
  • 89
  • 158
6
votes
3 answers

c++ read pixels with GetDIBits()

I'm trying to create a function which is equivalent to the windows API GetPixel() function, but I want to create a bitmap of my screen and then read that buffer. This is what I've got (Mostly copy pasted from google searches), when I run it it only…
Mandera
  • 2,647
  • 3
  • 21
  • 26
6
votes
2 answers

After writing BMP file, image is flipped upside down

I am using the following code: f = fopen( _stringhelper.STR("%s.bmp", filename), "wb" ); if( !f ) { _core.Error( ERC_ASSET, "ncImageLoader::CreateImage - Couldn't create %s image.\n", filename ); return false; } int w = width; int h =…
neko_code
  • 569
  • 11
  • 21
1 2
3
72 73