Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
Classes | Enumerations
png.h File Reference
#include <ilviews/bitmaps/streamer.h>

Classes

class  IlvPNGStreamer
 Bitmap streamer class. More...
 

Enumerations

enum  IlvPngWriteMethod { IlvPngWriteMethod::NoTransparencyFromViewsBitmap, IlvPngWriteMethod::TransparencyFromViewsBitmap, IlvPngWriteMethod::TransparencyFromViewsBitmap_withPureBlack, IlvPngWriteMethod::NoModification }
 The different PNG file writing modes. More...
 

Enumeration Type Documentation

◆ IlvPngWriteMethod

enum IlvPngWriteMethod
strong

The different PNG file writing modes.

Enumerator
NoTransparencyFromViewsBitmap 

The NoTransparencyFromViewsBitmap method is appropriate only for a IlvBitmapData drawn with Views. (i.e. with IlvPalette, IlvColor...)

  • Output PNG format: Generates a PNG without transparency, transparent pixels are drawn in black. Alpha is set to 255 in each pixel. RGB components are alpha blended.
  • Drawing limitations: There are no limitations, except that GDI+ or Cairo must be enabled to draw transparency.
TransparencyFromViewsBitmap 

The TransparencyFromViewsBitmap method is appropriate only for a IlvBitmapData drawn with Views. (i.e. with IlvPalette, IlvColor...)

  • Output PNG format: All transparency levels, including full transparency are written in the PNG, i.e. alpha can be in between 0 and 255. RGB components are not alpha blended in the output.
    • Drawing limitations: The pure black IlvColor (0;0;0) must be avoided to draw the bitmap, as the pure black pixels are transformed into full transparent pixels during the PNG writing process. As workaround, the black color must be drawn with a IlvColor with one of the RGB components set to 1, for instance RGB 0;0;1 . GDI+ or Cairo must be enabled to draw transparency.
TransparencyFromViewsBitmap_withPureBlack 

The TransparencyFromViewsBitmap_withPureBlack method is appropriate only for a IlvBitmapData drawn with Views. (i.e. with IlvPalette, IlvColor...)

  • Output PNG format: It generates a PNG with intermediate transparency levels but no full transparency, i.e. alpha can be in between 1 and 255. RGB components are not alpha blended in the output.
  • Drawing limitations: The pure black IlvColor (0;0;0) can be used to draw the bitmap, but the full transparent IlvPalette (alpha=0) cant be used to draw, as full transparent pixels are transformed into pure black (0;0;0), with alpha set to 255. GDI+ or Cairo must be enabled to draw transparency.
NoModification 

The NoModification method is not correct for a IlvBitmapData drawn with Views.

  • Output PNG format: Pixel's color components, including alpha, are not modified, All the data is written as defined in IlvBitmapData.
  • Drawing limitations: Do not use Views, i.e. IlvPalette, IlvColor to draw the bitmap.