Home > Mobile >  QT graph can be converted to bitmap data array
QT graph can be converted to bitmap data array

Time:09-26

I use qcustomplot draw a sine curve

Then I have a thermal printer to print the conditions of the bitmap is need bitmap bitmap hexadecimal data

So, how can I turn graph data printed??
Beg you Daniel guidance..

CodePudding user response:

You can use the bool QCustomPlot: : saveBmp (const QString & amp; FileName, int width, int height, double scale, int resolution, QCP: : ResolutionUnit ResolutionUnit),
In addition to look at how much is your printer memory and can support a picture the size of the cache,

CodePudding user response:

Yes this is the graph into BMP file, printer can recognize the image file, specific how to implement

CodePudding user response:

Excuse me, can you solve it? I also encountered this problem now

CodePudding user response:

Search related thermal printers, c # algorithm are helpful to you, little c + +

CodePudding user response:

refer to the second floor of A fat little tiger reply:
yes this is the graph into BMP file, printer can recognize the image file, specific how to implement


Is the graph into BMP, general thermal printer support binary figure, black and white picture

CodePudding user response:

QImage convertToFormat know

CodePudding user response:

The difficulty is not how to become a picture, but how to use thermal agreement to print this picture, a lot of thermal printers need their printing bitmap according to thermal agreement, such as id card image,

CodePudding user response:

refer to 7th floor feiyangqingyun response:
the difficulty is how to become a picture, and on how to use thermal agreement to print this picture, a lot of thermal printers need their printing bitmap according to thermal agreement, such as id card image,

Thank answer, has been solved before printing common data into a bitmap, did not go to study, but behind the image printing is convert image to binary roughly figure, and according to the location and size to go flat out these dots
  •  Tags:  
  • Qt
  • Related