Click here to Skip to main content
15,885,979 members
Everything / BMP

BMP

BMP

Great Reads

by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
by LeisureBamboo
Some kinds of DCR files' format/data structure

Latest Articles

by LeisureBamboo
Some kinds of DCR files' format/data structure
by dynamichael
Build an oct-tree from a color palette for a fast nearest color search

All Articles

Sort by Score

BMP 

25 May 2019 by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
22 Feb 2015 by Sergey Alexandrovich Kryukov
I was afraid that my suggestion to "think a bit" could possibly offend you a bit, so I probably have to illustrate what this thinking could mean.Suppose you have some bit data, which tells you (forget the "format", it is irrelevant):you have width = 3, height = 2, and pixels data...
15 Jan 2015 by Sergey Alexandrovich Kryukov
You should never assume any particular UTF encoding. All the .NET API is well abstracted from this representation. Remember that with all UTFs except UTF-32, the characters are represented using different number of bytes. With UTF-16, characters beyond BMP are encoded using surrogate pairs. You...
21 Feb 2015 by nv3
Just exchanging width and height will not rotate the image. You also need to rotate the bitmap data pixel by pixel. That requires quite a bit of buffer handling and data shoveling. For an example how to do it, look here: Add fast user-extensible image processing support to CBitmap[^]
21 Aug 2018 by OriginalGriff
If I read you right, you want to create a file for each of the possible colours that a bitmap can contain. That's not necessarily a problem, but the reason it doesn't work for you is that you are running out of file handles. Because you don't close your files when you are finished with them,...
23 Feb 2015 by KarstenK
as barneyman wrote rotating the bmp in memory is the right solution.Read the outstanding article CXImage which provides some tons of features and also rotating code. In the sources you will find some code for rotating images.
25 Feb 2015 by CPallini
You have to take into account that bitmaps have rows aligned on 32 bits (i.e four bytes) boundaries (they are padded). The original bitmap, having width 800 doesn't need padding (hence is size is exactly 1646454 bytes) while the rotated image needs it (686 % 4 is non-zero), that is you need to...
25 Feb 2015 by Andreas Gieriet
Rotating a matrix by 90 degree is done by the following transformation of zero-based indices:A = N x M original matrixB = M x N transformed matrix (i.e. rotated by +90 degree)A[i,j] -> B[M-j-1,i]So, you read the data into the original matrix in memory, create a transformation matrix in...
5 Apr 2016 by Jochen Arndt
If you don't want to use a library you have to write the code yourself. You may have a look at the sources of open source libraries like ImageMagick: Convert, Edit, Or Compose Bitmap Images[^] or it's derivate GraphicsMagick Image Processing System[^] as starting point. The simplest solution...
26 Dec 2019 by Richard MacCutchan
vb.net png to bmp - Google Search[^]
24 Apr 2023 by LeisureBamboo
Some kinds of DCR files' format/data structure
23 Feb 2015 by Alexis i
i'm trying to rotate a 686*800 bmp photo 90 degrees.here's my code, it corrupts the file!#include#includeusing namespace std;int main(){ fstream flower("flower.bmp", ios::in | ios::out | ios::binary); flower.seekg(18,ios::beg); char...
25 Feb 2015 by BacchusBeale
If you are writing code for windows you can use .Net library to help you:Rotate image[^] then it will work for any image.As already mentioned it is not good to use hard-coded values, they should be parameters to your method.Also using a Hex Editor can help you see what the file really...
15 Mar 2015 by rahul15001
Below is the pseudo code to compare two image by ignoring the rectangular area which contains dynamic data#include #define WID 200#define DEP 600typedef struct {int left;int top;int right;int bot;} rect;char image1[WID*DEP];char image2[WID*DEP];int inrect...
27 Mar 2015 by avlasx
Hi all,I'm tring to develop a SW that extracts single bmp frames from a video file encoded with 3ivx codec. I must use vfw interfaces...First of all I'have installed 3ivx decoder (3ivx_MPEG-4_504) and check that with "mediaplayer classic" video is played correctly. Im'm working on win8.1...
4 Apr 2016 by Garth J Lancaster
I'd start with a look here How to convert a bitmap into a 1bpp monochrome TIFF in C# – Knowledgebase[^]
5 Apr 2016 by Patrice T
Quote:the problem is how to convert from BMP to TIFF without using any external libraries.Simple !You just have to make a program that is replacing the library you don't want to use !You have to:- define a neutral format that suit your needs. Usually an array containing a bitmap version of...
19 Oct 2016 by Rajib13
I want to create a custom print preview contol like thing in which I shall change the print document and want to see the dynamicaly rendered image of the document i.e. changed document that will be printed if sent to printer. But I donot have any idea about how to render the document to image...
19 Oct 2016 by Midi_Mick
Its actually quite simple to do. Your "Print" routines have a Graphics object that you normally print to. When sending the output to the printer, this Graphics object is created from the printer's device context - thus sending the output to the printer.If you create a bitmap with a white...
21 Aug 2018 by Raj Swami
below is my code in that i'm trying to create 1000 bmp images to represent some colors. i'm writing pixel values from loop values. output of this code generate only 508 images, if i set any for loop it again generate only 508 images. my main goal is to create 16581375 images of all colors. so...
27 Nov 2018 by Richard MacCutchan
Sorry, this site does not provide code to order. If you cannot find a sample via Google then you need to consider writing it yourself.
26 Dec 2019 by Graham Irons
I have an MS Access Database with an OLE Column of PNG images. I need to convert then during runtime within an For Each/Next loop. Your assistance will be appreciated. Graham What I have tried: Bing Search, Microsoft Search & Google Search
21 Apr 2022 by mrraggi
Hello All, Does anyone know a way to convert a EPL string to a image or pdf file? What I have tried: I can re-do the EPL file in ZPL format, but wanted to just print to an image.
21 Apr 2022 by Dave Kreskowiak
You're going to have to find some component, or write one yourself, to parse the EPL and render it to an image of your specifications. This isn't going to be a small piece of code. I'd probably start by Googling for "render epl".
18 Sep 2022 by Member 8840306
I am new in qt c++. I am trying to load blob image which is stored in .bin file in phpmyadmin db .That .bin file store blob image in form of string like BM6 ect(each .bin have 3 to 4 char). Here is my code that execute on button click driver...
18 Sep 2022 by Rick York
BM6 is the header of a bitmap file, followed by a double quote character - 0x22. Following the 0x22, there are four nulls. You can not expect to copy a bitmap's binary data using strncpy because there are null characters in it and they will...
23 Sep 2022 by Member 8840306
I am new in C++ .I am trying to load blob image which is stored in .bin file from sql Database. That .bin file store blob image in form of string like BM6 ect(each .bin have 3 to 4 char). Here is code(working) that save the blob image(.bmp) in...
6 Dec 2022 by Ribless
I made an environmental map in blender so that I could have a custom reflection on my windows screensaver. It needs to be a bitmap (.bmp) file, but blender doesn't save or export as bitmap. Is there any file format I could use to convert to...
14 Apr 2023 by Member 12437251
Hi, I am developing a solution for a hardware device in pure C.I need to compress an image BMP and thought in using the TIFF format (the image is monochromatic), the problem is how to convert from BMP to TIFF without using any external libraries.Anyone can...
15 Jan 2015 by User 11060979
Dear expertsI’m trying to understand .NET strings and Unicode in all its details. From what I read, .NET strings are UTF16 coded.Based on this “knowledge”/”assumption” I tried to see how Code Points out of BMP will be handled by .net strings and failed on my very first experiment.My...
16 Mar 2015 by Frankie-C
Read the four bytes together as DWORD, or unsigned int as you prefer, dimension your image arrays as same var type and you're done ;)#include #define WID 200#define DEP 600 typedef struct {int left;int top;int right;int bot;} rect; DWORD...
30 May 2016 by OriginalGriff
Very unlikely.STL files are 3D mapping data files for 3D printing; BMP files are 2D flat images. So either you would have to make "N slices" each an individual bitmap, or you'd have to chose a projection point and "render" the image. Automatically as part of you project? Unlikely to work in...
30 May 2016 by Vijay Pareek
I am looking for any tool or code that can convert STL file to BMP File. Is there any way to do this? I have to do this conversion thing in my project.every solution or hints are welcome.Thanks in Advance.What I have tried:i am using a third party tool Slic3r. but it is only giving...
25 Feb 2015 by Alexis i
here's my code, it corrupts the photo i donno why!** its a 24-bit bitmap **#include#includeusing namespace std;int main(){ fstream flower("flower.bmp", ios::in | ios::out | ios::binary); //declaring an array which holds data bytes belong to 800*686...
21 Feb 2015 by Alexis i
#include#include
21 Aug 2018 by Patrice T
Quote: my main goal is to create 16581375 images of all colors. The whole idea look very wrong to me. Just because a directory is not sorted, finding a file involve reading sequentially all file names until you find the 1 you looking for. I fear it will be faster to build the file on fly for...