Go to the documentation of this file.
43 typedef enum _DIBFormat {
73 typedef enum _InterpolationFlag {
358 Bitmap Flip(
bool is_flip_horz,
bool is_flip_vert);
408 int& out_left,
int &out_top,
const RectI* clip_rect =
NULL);
505 typedef enum _Orientation {
540 explicit Image(
const char* path);
547 explicit Image(
const wchar_t* path);
556 explicit Image(
const void* buffer,
size_t length);
722 void SetDPIs(
int x_dpi,
int y_dpi);
753 bool SaveAs(
const char* file_path);
784 bool SaveAs(
const wchar_t* file_path);
834 #endif // FS_IMAGE_H_
Type
Enumeration for image type.
Definition: fs_image.h:467
Bitmap StretchTo(int dest_width, int dest_height, InterpolationFlag flag, const RectI *clip_rect=0)
Stretch with different size.
DIB format: 1bpp format, two color RGB bitmap.It does not support format conversion between bitmaps.
Definition: fs_image.h:47
Not have image type yet.
Definition: fs_image.h:475
DIBFormat GetFormat() const
Get bitmap format.
Image type is GIF.
Definition: fs_image.h:483
Orientation GetOrientation() const
Get image orientation.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
const uint8 * GetBuffer() const
Get bitmap buffer.
Orientation
Enumeration for image orientation.
Definition: fs_image.h:505
int GetWidth() const
Get bitmap width.
DIB format: 32bpp format, with bits order "Blue, Green, Red, Alpha". Blue is in the lowest order.
Definition: fs_image.h:53
Unknown image type.
Definition: fs_image.h:469
DIB format: 8bpp alpha mask.
Definition: fs_image.h:57
int GetWidth() const
Get image width.
Bitmap TransformTo(const Matrix &matrix, InterpolationFlag flag, int &out_left, int &out_top, const RectI *clip_rect=0)
Transform current bitmap (as source bitmap) into destination one.
Image type is webp.
Definition: fs_image.h:497
Image type is JBIG2.
Definition: fs_image.h:492
File stream interface, reading & writing.
Definition: fx_stream.h:692
Header file for common definitions and classes.
First rotate 90 in clockwise direction and then flip horizontal.
Definition: fs_image.h:517
FX_UINT8 uint8
8-bit unsigned integer.
Definition: fs_basictypes.h:204
File reading interface.
Definition: fx_stream.h:587
Header file for file operation related definitions and functions.
16bpp format, bits order: Red 5 bits, Green 6 bits, Blue 5 bits. Red is the lowest order.
Definition: fs_image.h:65
DIB format: 24bpp format, with bits order "Blue, Green, Red". Blue is in the lowest order.
Definition: fs_image.h:49
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:210
Bitmap & ConvertFormat(DIBFormat format, void *icc_transform=0)
Convert a bitmap to another specified DIB format.
RectI CalculateBBoxByColor(ARGB backgroud_color)
Calculate the bounding box according to the given background color.
bool operator==(const Image &other) const
Equal operator.
DIB format: 8bpp format, 256 color GrayScale bitmap.
Definition: fs_image.h:61
DIB format: 32bpp format, with bits order "Blue, Green, Red, not used". Blue is in the lowest order.
Definition: fs_image.h:51
Bitmap Clone(const RectI *clip_rect=0) const
Clone current bitmap, with specified clip rectangle.
int GetYDPI() const
Get DPI for Y-axis.
bool AddFrame(const Bitmap &bitmap)
Add a bitmap as a frame. (Unsupported DIB formats: Bitmap::e_DIBRgb565 and Bitmap::e_DIB8bppMask)
Rotate 90 degrees in counter-clockwise direction.
Definition: fs_image.h:523
bool operator==(const Bitmap &other) const
Equal operator.
Bitmap GetMask(const RectI *clip_rect=0)
Get the mask if bitmap has mask.
int GetBpp() const
Get bitmap bits-per-pixel.
First rotate 90 in counter-clockwise direction and then flip horizontal.
Definition: fs_image.h:521
DIB format: 32bpp format, with bits order "Red, Green, Blue, Alpha". Red is in the lowest order.
Definition: fs_image.h:63
void FillRect(ARGB color, const RectI *rect=0)
Fill current bitmap with a specified color.
Normal orientation.
Definition: fs_image.h:509
Image type is JPX or JPEG-2000.
Definition: fs_image.h:487
Invalid DIB format.
Definition: fs_image.h:45
Bitmap ConvertToMono()
Converts bitmap to 1-bit monochrome format.
Image type is PNG.
Definition: fs_image.h:481
int GetPitch() const
Get bitmap pitch.
int GetXDPI() const
Get DPI for X-axis.
bool operator!=(const Bitmap &other) const
Not equal operator.
bool operator!=(const Image &other) const
Not equal operator.
InterpolationFlag
Enumeration for bitmap interpolation flags.
Definition: fs_image.h:73
Flip Horizontal.
Definition: fs_image.h:511
If set, do not do halftone for shrinking or rotating.
Definition: fs_image.h:75
Flip Vertical.
Definition: fs_image.h:515
Foxit namespace.
Definition: fs_taggedpdf.h:27
Rotate 180 degrees in clockwise direction.
Definition: fs_image.h:513
void SetDPIs(int x_dpi, int y_dpi)
Set DPI for X-axis and Y-axis.
Bitmap()
Constructor, as an empty bitmap object.
DIB format: 8bpp format, 256 color RGB bitmap.
Definition: fs_image.h:59
Image & operator=(const Image &other)
Assign operator.
If set, do interpolation for stretching or transforming.
Definition: fs_image.h:77
Bitmap GetFrameBitmap(int index) const
Get a frame bitmap, specified by index.
Bitmap Flip(bool is_flip_horz, bool is_flip_vert)
Flip bitmap.
Type GetType() const
Get image type.
If set, do bicubic interpolation for stretching or transforming.
Definition: fs_image.h:79
#define NULL
The null-pointer value.
Definition: fx_system.h:792
int GetHeight() const
Get image height.
DIBFormat
Enumeration for DIB format.
Definition: fs_image.h:43
Image type is TIF or TIFF.
Definition: fs_image.h:485
Bitmap SwapXY(bool is_flip_horz, bool is_flip_vert, const RectI *clip_rect=0)
Swap X,Y coordinations of the bitmap. After being swapped, the image can also be flipped at the same ...
bool IsEmpty() const
Check whether current object is empty or not.
Bitmap & operator=(const Bitmap &other)
Assign operator.
Definition: fs_image.h:460
int GetHeight() const
Get bitmap height.
Definition: fx_coordinates.h:596
bool SaveAs(const char *file_path)
Save current image as an image file.
Definition: fx_coordinates.h:1076
Rotate 90 degrees in clockwise direction.
Definition: fs_image.h:519
int GetFrameCount() const
Get frame count.
Definition: fs_image.h:36
DIB format: 32bpp CMYK format, with bits order "Cyan, Magenta, Yellow, Black". Cyan is in the lowest ...
Definition: fs_image.h:55
Image type is BMP.
Definition: fs_image.h:477
bool IsEmpty() const
Check whether current object is empty or not.
Definition: fs_basictypes.h:449
RectI DetectBBoxByColorDiffer(int detection_size, int color_differ=64)
Detect the bounding box of content according to the given color difference between content and margin...
Image type is JPG or JPEG.
Definition: fs_image.h:479
No orientation.
Definition: fs_image.h:507
@2025 Foxit Software Incorporated. All rights reserved.