ImageGear for C and C++ on Windows v20.5 - Updated
IG_vect_raster_set_fileformat
API Reference Guide > Vector Component API Reference > Vector Component Functions Reference > Raster Functions > IG_vect_raster_set_fileformat

This function assigns a file format to the raster entity to allow saving it automatically as a reference in SVG images.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_vect_raster_set_fileformat(
      HIG_VECT_ENTITY hEntity, 
      long nFormat
);

Arguments:

Name Type Description
hEntity HIG_VECT_ENTITY Handle to the Entity.
nFormat long File format identifier.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

None

Remarks:

If raster file name is an empty string, or starts with "data:image", SVG filter embeds raster data to the image file, otherwise it saves it in a separate file, using the format specified by IG_vect_raster_set_fileformat, and references it in the vector file.

According to the SVG specification, readers shall support at least PNG and JPEG formats.

Is this page helpful?
Yes No
Thanks for your feedback.