Print BMP with ZPL - bmp

How can I use ZPL II to print a bitmap (BMP) image?
I used ~DY to download the BMP to the printer:
~DYR:PRINT,B,B, <size> , <width> , <data>
I am using PHP to send raw data to the printer, so <> variables are coming from that script.
Using the printer's diagnostic utility I verified that the file was successfully downloaded using that command. I was also able to print that BMP file using TSPL, a different printer language that this particular printer also supports in addtion to ZPL, so I know that the BMP was written correctly.
I tried using the following code to then print the BMP:
^XA
^FO0,0^XGR:PRINT.BMP,1,1^FS
^XZ
But it only spits out a blank label.
What am I doing wrong?

Try this instead:
^FO0,0^IMG:PRINT.BMP^FS
Good luck.

After my information you canNOT use .BMP extension, thus it is set to a fixed value, which is .GRF
Check this as well -> http://www.servopack.de/support/zebra/ZPLII-Prog.pdf

You can use ZebraNet Bridge to convert your BMP (or PNG, or JPG, etc) to GRF format
http://www.zebra.com/id/zebra/na/en/index/drivers_downloads/utilities/other_utilities/zebranet_bridge_enterprise.html

Here is the link to download the Zebra Setup Utilities:
https://www.zebra.com/us/en/support-downloads/eula.-227178c9720c025483893483886ea54dde80fe8dccd74087deac0002665121f1b906a97e0267e4c60078aef6cd4a559.html
Once I launched the app I pressed the "Install New Printer" button and installed a random printer.
After installing the printer, select the printer and press the "Download Fonts and Graphics" button. This will install the "ZebraDesigner Fonts and Graphics Downloader".
You can use this utility to convert bitmaps to zebra bitmaps.
I am following these directions now. I'll let you know if it works.
https://km.zebra.com/kb/index?page=content&id=SO7892
The software works, but I still can't convert a .bmp to an actual ZPL bitmap.

This site provides a ZPL viewer that includes the ability to import an image. When imported, the image is converted to ZPL and the resulting code is provided.
http://labelary.com/viewer.html
Obviously this will only work for static images.

Related

How to display iPhone images (bmp V3 format) on QML in Windows

I have a problem with iPhone images (bmp V3 format) when use Qt (version 5.6.0) to display them on QML in Windows.
When I click file images directly, I can see it
But when I opened it by Qt, Qt displays a dialog error: Fail to read image.
I put an example bmp V3 format at below link
https://files.fm/u/38c9b5ef#=
Just convert the image to PNG or some other supported format...
Check out this search result:
https://www.google.com/search?q=convert+BMP+v3+to+PNG

Text recognition is not working with sikuli for some words

I am new to use Sikuli for testing with IntelliJ. I am using Sikuli jars from version 1.1.0. I have extracted the libs folder. I have put the tessdata contents(github) inside libs/tessdata folder.I have put the settings for OCR text search, read and also put in environment variable(libs/tessdata).
However the screen.click("text") is working good. But I found out that it is not working at some cases.
When the text size is less than the 9 as per word.
The font color and style is different, the findFailed exception occurs.
S is taken as 5 sometimes.
some words are recognized as different.
Can anyone help me what's wrong with this kind of usage?
It is a known problem. Just as you found it yourself, small and sometimes "thin" fonts won't be recognized properly. There is not much you can do on the Sikuli side but what you can try is:
Play with tesseract settings
Try to apply some image processing techniques to the text areas before you perform the recognition. For example to increase the fond size
There are few more tricks for when you are just wanting to recognize text in a known area (rather than when you want to find text on the screen), which is to use Sikuli to double click the text and copy its contents to buffer.
screen.click("text") — this wont work, it will search for text.png.
You can try:
String text ="SEARCH";
screen.findText(text).click();

doxygen Call graph does not work

I have installed doxygen and graphviz-2.38 on my windows 7. But when i generate Call graphs or Called graphs, the png file or the graphs does not open, it generates .md5 file but searches for .png files for the graphs . Please help.
Doxygen can use the "dot" tool from graphviz to generate more advanced diagrams and graphs.
If you have the "dot" tool in the path, you can set HAVE_DOT to YES in the configuration file to let doxygen use it. Among the dot options, use DOT_IMAGE_FORMAT also.
The DOT_IMAGE_FORMAT tag can be used to set the image format of the images generated by dot. Possible values are svg, png, jpg, or gif. If left blank png will be used.
Note
If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files visible in IE 9+ (other browsers do not have this requirement).

Is XMP metadata supported in PNG images?

I've been trying to understand how XMP metadata worked on PNG files for the last few hours but couldn't quite wrap my head around it.
If I create a PNG image with Photoshop, save it and open the File Info dialog (File > File Info or Ctrl+Alt+Shift+I), I can see some XMP properties like CreateDate, CreatorTool or ModifyDate.
Now if I try to open the file with exiv2 and read the metadata it seems to not find anything:
auto image = Exiv2::ImageFactory::open(imagePath);
image->readMetadata();
Exiv2::XmpData &xmpData = image->xmpData();
The same goes with the exiftool -xmp:all myImage.png, exiv2 -P X myImage.png, or even GIMP (but I think it is using exiv2 internally).
This wouldn't be such an issue if any added metadata were not removed when saving again with Photoshop. In case this wasn't clear, opening the image and adding XMP metadata with exiv2, saving it, opening the image back in Photoshop and in the file info dialog, the properties added previously are not there any more.
The weird thing is that if you do this entire process with a JPEG image, everything works as expected: all the properties are visible from both Photoshop and exiv2 and if I try to add metadata with exiv2 (using the same code), it appears in Photoshop as well.
Am I missing something obvious? Is there anything special about PNGs that is not true for JPEGs? I haven't tried to use Adobe's SDK to edit the XMP data, is it any better?
Any help would be much appreciated as this is starting to drive me crazy :/
Edit: After reading this post I tried with Adobe Bridge and it doesn't seem to display the same properties as Photoshop. If I add XMP metadata with Exiv2 they are displayed in Bridge but if I modify the image in Photoshop, the metadata is gone from Bridge again.
Right, I finally got my hands on a copy of Photoshop CC and everything works fine. It must have been a bug in CS5 and CS6 that has been corrected in CC.
I think a recent update of Photoshop CS6 (13.1?) fixed this issue. It seems to have fixed problems with ICC color profiles in PNG images as well: http://forums.adobe.com/thread/1183489

Eclipse plug-in: ObjectAid UML Explorer Class Diagram: export in higher resolution

I am using ObjectAid UML Explorer to generate a UML Class Diagram from my code.
I need to include the output PNG in a LaTeX document and what I get is way too low resolution for inclusion.
How can I get higher resolution output from the Eclipse plug-in?
I can see the internal format of a .ucls file is just XML:
<class-diagram version="1.0.10"...
Is there a way to get something more dense than 72dpi or something in a scalable format, say EPS or similar? The target document is > 300dpi so 72dpi does not even come close, unfortunately. Whatever rasterises the XML definition has to accept a trap and a pluggable module?
I need something that plugs into the auto-save mechanism of ObjectAid...
I've found a dirty but easy solution to the problem.
By printing the diagram to a PDF, e.g. with programs like PDFCreator, you gain a vector graphic in the PDF. With a graphics editing program like Adobe Photoshop or Gimp you can raster the PDF to a high quality PNG.
It worked fine for me.
With ObjectAid's Diagram Add-On you can make some customizations regarding the printing scale. There's also the possibility to save the diagrams as SVG image, which you can convert to a high quality pixel image, too.
Did you try to use a cropping/design tool such as snagit which would crop a copy of your computer screen and export it in high definition such as an image or directly paste and copy inside a word document ?
I have the same problem than you for providing documentation of my java code. I use EclipseUML Omondo but the image export is pretty poor too. I now prefer to use specific cropping tool for my image export which is a lot better.
I mean that you create the view you need on your computer screen then crop it and paste it in your documentation. I like to use the snagit's paste and copy feature with Microsoft word.
My favorite tool for cropping my UML diagrams is snagit.
Not possible until ObjectAid implements the feature...
Although it's not glamorous, what I did was go into Window | Preferences | General | Appearance | Colors and Fonts inside Eclipse and set all the text fields to double their size.
This created a larger diagram and the export was therefore in a higher res.