![Citizen CL-E300 Programming Manual Download Page 23](http://html1.mh-extra.com/html/citizen/cl-e300/cl-e300_programming-manual_2610002023.webp)
CITIZEN Android Label Print SDK
—
Programming Manual
23
2.2.7 storeNVBitmap method
Syntax
int storeNVBitmap (String filePath, String name, int rotation, int width, int height)
Parameters
Parameter
[IN/OUT] Description
Setting range
filePath
[IN]
Path to a bitmap file to store
name
[IN]
File name to store
ASCII characters except below:
-Underscore cannot be the first
character.
-The following symbols.
\
/ : * ? " < > |
rotation
[IN]
Direction of rotation
CLS_RT_NORMAL
:
No rotate
CLS_RT_RIGHT90
:
Rotate right 90
CLS_RT_ROTATE180
:
Rotate 180
CLS_RT_LEFT90
:
Rotate left 90
width
[IN]
Horizontal size (pixels)
height
[IN]
Vertical size (pixels)
Description
Stores a bitmap image into the flash memory with specified settings such as file name, rotation, width
and height. The stored bitmap image can be used by the
Supported graphic file formats are BMP/GIF/EXIF/JPG/PNG/TIFF.
The image is resized by the specified width and height with keeping the original aspect ratio.
Example
:
The image size will be 200 x 50 pixels under the following conditions.
The original image size
:
400 x 100 pixels
Width
:
200
Height
:
200
If 0 is set to either width or height, the image size will be calculated by another parameter.
Example
:
The image size will be 800 x 200" pixels under the following conditions.
The original image size
:
400 x 100 pixels
Width
:
0
Height
:
200
Return value
Returns CLS_SUCCESS (0) on success. See "
" for the error codes.
Example
// Store bitmap
printer.storeNVBitmap("/sdcard/temp/citizen/Images/Sample.bmp", "Sample",
LabelConst.CLS_RT_NORMAL, 0, 0);
// Draw bitmap
design.drawNVBitmap("Sample", 1, 1, 0, 0);
printer.print(design, 0001);