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
-2
votes
1 answer

Writing bmp file in C gives wrong result

I'm trying to write a function that reads a bmp file and then makes a copy of it. I'm reading the image header to a struct as usual, and copying the pixel values to RGB matrices. The function that I'm building to write the BMP file gives the right…
tropez
  • 138
  • 3
  • 13
-2
votes
1 answer

Issue with horizontally resizing BMP Image (C#)

Link to Project: https://github.com/FFladenmuller/resize-bmp Code works for a resize with a factor of 1. However, if trying a larger factor and I open the image, Photos says: "It looks like we don't support this file format". I have not added in…
FredF
  • 7
  • 2
-2
votes
1 answer

C bmp header contains wrong information

I am trying to get the height and width of a bmp picture, however the values i am getting are incorrect and are not the actual size of the picture. Here is my code for doing so: #include #include void main() { FILE *…
Yellow
  • 3
  • 2
-2
votes
1 answer

How does this program work C?

void fade(ImagenBMP *imagen1, ImagenBMP *imagen2, int f) { float v = (float)f/255; for (int i = 0; i < imagen1->tamanyo; i++) { imagen1->datos[i] = (imagen1->datos[i] - imagen2->datos[i])*v + imagen2->datos[i]; }}; //end of fade It's supose to…
danibeam
  • 29
  • 6
-2
votes
1 answer

phpthumb not working with bmp file

I am creating thumbnails of image using phpthumb, its working fine for other formates except bmp file. The Method GenerateThumbnail() returning false with bmp image. Do I need to set any parameter for the this.
Sudhir
  • 1
  • 2
-2
votes
2 answers

Trouble reading C bmp into memory

I am trying to read a .bmp header into memory. I am getting a core dump when I run the program. BMP_Image *Read_BMP_Header(FILE* fptr) { fseek(fptr, 0, SEEK_SET); BMP_Image *bmp_image = NULL; bmp_image = malloc(sizeof(BMP_Header)); …
-2
votes
2 answers

How to turn a .bmp or a .xlsx into a 2D array

I have a .bmp file and a matrix representation of its greyscale values in a .xlsx file. Originally I thought I would just take the values from the .xlsx file and hard code it into an array, but I just opened it up and there are way too many values…
Tommy K
  • 1,759
  • 3
  • 28
  • 51
-2
votes
1 answer

fread and fwrite distort file binary

I am attempting to write a program that creates .bmp's of a set size. In order to do so, I am trying to put a set header at the beginning of each file. However, whenever I do this the bytes seem to get distorted. Instead of this: 00000000 42 4d 7e…
JorgenH
  • 17
  • 1
-2
votes
1 answer

What are the three 255's before the image in a monochrome .bmp?

I'm trying to figure out bitmap formatting for a project I'm working on, but there's one thing I don't really get. In this .bmp: 00000000 42 4d aa 00 00 00 00 00 00 00 82 00 00 00 6c 00 |BM............l.| 00000010 00 00 0a 00 00 00 0a 00 00 00…
JorgenH
  • 17
  • 1
-2
votes
1 answer

How to remove a header from a file that is .bmp using objective c

How to remove a header from a file that is .bmp using objective c. I am getting 54 bytes extra. But in order to view image have to remove these 54 bytes and get actual image bytes. NSData *data = [NSData dataWithContentsOfFile:snapshotFile options:0…
-2
votes
1 answer

Create a bitmap file in python 3.4

I need to create a white bitmap file with python 3.4. I already searched in the internet but the modules "Image" or "ImageDraw" dont work in Python 3.4. So how can i create a bitmap file? Or maybe which modules i have to use?
Sven
  • 153
  • 2
  • 17
-2
votes
2 answers

How to set BMP file width and height in DIB header when image size exceeds 255 pixels?

I am creating simple BMP image with Java. Unfortunately I do not know how to store width and height size information into the DIB header, when the size of width or height exceeds 255 value in decimals (FF value in hex). To create small size image…
Fataho
  • 99
  • 3
  • 15
-2
votes
1 answer

writing a bmp file of a checkerboard in mips assembler

hi i am required to write a program in mips assembler where i am to create a checkerboard which is too be saved and written to a bmp file, compile this program it has a problem with writing the file because it jumps straight to my error message…
-2
votes
1 answer

Scaling bmp files by memory size

I have a bmp file. My objective is to scale down the file to 70% of total file size. I have read the bmp headers and pixel array into src_buffer. Now I have a function that intakes pixel array and src_buffer, width of the bitmap(in pixels)…
tinutomson
  • 329
  • 6
  • 12
-2
votes
1 answer

glReadPixels save to BMP - Color Dirstortion

I'm using OpenGL and PCL_lib right now, And I want to draw a accessory on the background pic. Here is my output_image on display: Image source is PCD format(PCL lib), drew by OpenGL and Here is my code where to save the GL_pic: char…
Porter Chen
  • 9
  • 2
  • 5
1 2 3
72
73