Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Fri 13 Nov 2015, 02:12 PM
Back in April of 2008, I wrote a blog post called Help make sure PNG is stored natively in 8.5. The issue then, and still now in Notes 9.0.1, is that while Notes rich text stores and renders PNG graphics perfectly well, when a user actually imports a PNG graphic from the Notes client, it is converted and saved as a JPEG file. Aside from other more minor issues, this means that transparency is lost, thus wrecking many images. As a simple example, consider this logo as it appears above converted to JPG and below stored natively as PNG. 

Inline JPEG image

While it is true that Midas will handle this now (and has since 2008, btw), I am not suggesting you run out and buy Midas for this. I am suggesting the IBM fix the Import. It is easy to do, as I know because it took only a couple of hours to fix the functionality in Midas once I realized that the native format was available. It uses image segments just like the JPG and GIF files do, with the addition of an oddly undocumented but easy to discern CDPNGHEADER record. I have even included the relevant undocumented pieces needed in the same format that the C API uses.

/* Defining undefined ODS elements */
#define SIG_CD_PNGHEADER      (82 | BYTERECORDLENGTH)

#define CDIMAGETYPE_PNG   4

typedef struct
  {
  BSIG  Header;       /* Signature and Length */
  WORD  ImageType;    /* Type of image (e.g., PNG, etc.) */
  DWORD ImageDataSize;    /* Size (in bytes) of the image data */
  DWORD SegCount;     /* Number of CDIMAGESEGMENT records expected to follow */
  DWORD Flags;        /* Flags (currently unused) */
  DWORD Reserved;     /* Reserved for future use */
  } CDPNGHEADER;


Please, IBM, fix the import. Don't make Notes look even more antiquated, clunky and obsolete than many people already think it is. Please!

Copyright © 2015 Genii Software Ltd.

Tags: