This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Apr 22, 2013, 10:16 AM
2 Posts

NotesDxlImporter png error

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0
  • Role: Developer
  • Tags: DXL,png,NotesDxlImporter
  • Replies: 3

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

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

 

 

Apr 22, 2013, 4:25 PM
74 Posts
Forwarded to development <>
DXL Import/ag
Apr 23, 2013, 1:57 PM
4 Posts
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 <jpeg> element where it should use <png>. 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.

Apr 29, 2013, 9:06 AM
2 Posts
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


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal