NotesDxlImporter png error

Hi all,

I have an agent for importing images selected by the users into the image resources of a db. The code works fine with 8.x release and previous.

With release 9.0 the imported image (only for png file type) is broken and if you try to use it, the client crashes.

The importer works with JPG or GIF images.

It seems that the NotesDXLImporter class in the new release has a fault…

Any idea?

Stefano

Ps: If you want to reproduce it follow these steps:

  1. Import a png file in your image resources.

  2. Using tools\DXL Utilities\Exporter create the xml for that image

  3. Write an agent with this code:

Dim session as new notessession Dim importer As NotesDXLImporter Dim stream As NotesStream Dim filename As String Set stream = session.CreateStream filename = “C:\Image.xml” '<<<< path of the xml file If Not stream.Open(filename) Then MessageBox "Unable to open file " & filename, “Error” Exit Function End If ’ Import the DXL in “create” mode - replaces existing images Set importer = session.CreateDXLImporter ’ --------------- Replica DB ---------------------- importer.ReplicaRequiredForReplaceOrUpdate = False ’ ------------------------------------------------- On Error GoTo errh Call importer.SetInput(stream) Call importer.SetOutput(db) importer.DesignImportOption = DXLIMPORTOPTION_REPLACE_ELSE_CREATE Call importer.Process Call stream.Close
4. Run the agent

  1. The resource is created in image resources but it is not viewable or utilizable in any form

Subject: RE: NotesDxlImporter png error

Thanks Andre,

I’d like to change the exported xml adding this “new png flag”, can you please tell me more about that? Is this a particular xml tag I have to add?

Ciao,

Stefano

Subject: Forwarded to development <>

DXL Import/ag

Subject: I can reproduce the issue

It’s unclear whether the problem is new in 9.0. However, it should be reasonably easy to fix (probably in 9.0.1 or whatever we release next). For the moment, all I can advise is that you use the “note” format for round-tripping images, or (if your application can support it) copy the design notes around directly using “document” objects.
The problem is that there’s a new flag in the image header, which marks the image as being a PNG instead of a JPEG, and the flag is being ignored by the exporter, resulting in it emitting a element where it should use . So if you can tell from the filename that this is a PNG, another option is to modify the XML yourself after the exporter generates it.
Update: being tracked in SPR AGUD972MJJ.