Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: xuthos am 15.09.04 - 13:14:49

Titel: Bildverwaltung...
Beitrag von: xuthos am 15.09.04 - 13:14:49
Hi @All,

ich such nach einer Lösung für folgende Aufgabenstellung.

Ich muß ein Bild (jpg) in ein RichTextFeld ablegen mit der Option, das man das Bild sieht. Zudem muß dieses Bild auch später in ein WordDoc oder Datei exportiert werden. - Und das ganze im FrontEnd.

Habt Ihr ne Lösung wie ich das realisieren kann - ohne ein extra Tool einzukaufen.

Gruß

SVen
Titel: Re:Bildverwaltung...
Beitrag von: klaussal am 15.09.04 - 13:47:16
... mal so als Grundlage.. ;)
klaus
Titel: Re:Bildverwaltung...
Beitrag von: xuthos am 16.09.04 - 07:49:31
Danke Klaus,

die hilft schon einmal weiter. Jetzt muß ich das Ding nur noch ins Word per Knopfdruck bringen.

Gruß

Sven
Titel: Re: Bildverwaltung...
Beitrag von: Schnulli am 13.06.07 - 11:16:15
Hallo zusammen,

Klaus: Danke, die DB "Image Library Test" ist wirklich sehr hilfreich.
Jetzt hab ich noch 2 Fragen:

1. Gibt es eine Möglichkeit auch die Auflösung des Bildes anzuzeigen? (z.B. 300 dpi)
Hab im Netz geforscht, bin auf ImageResolution gestoßen, hab auch versucht, das Script entsprechend abzuändern, bin aber gescheitert....

2. Xuthos: hat das inzwischen mit dem Export in Word geklappt? Hab gelesen, daß das nur wenige Spezialisten können oder man sich ein Tool zulegen muss.

Viele Grüße
Iris
Titel: Re: Bildverwaltung...
Beitrag von: Driri am 13.06.07 - 11:31:30
Nur als Hinweis, es gibt für die Verwaltung von Bildern bereits zwei Lösungen bei OpenNTF.

Picture Gallery (http://www.openntf.org/projects/pmt.nsf/3f2929edba6ef2808625724c00585215/57d0e5a6d6ab1db986257296003cfe06!OpenDocument)

SimplePhotoAlbum (http://www.openntf.org/projects/pmt.nsf/3f2929edba6ef2808625724c00585215/87ca185191d0089c862572f800763ffc!OpenDocument)
Titel: Re: Bildverwaltung...
Beitrag von: diali am 13.06.07 - 11:33:04
zu 1.
bei jpg und gif steckt dies im Datei-Header. Allerdings wird die Auflösung eventuell beim einbetten geändert und Du musst Dich mit den Headern der verwendeten Bildtypen auseinandersetzen.

zu 2.
Word kann per COM angesprochen werden. Entweder das Kopieren über die Zwischenablage realisieren oder das Dokument als XML exportieren und dann das Bild im Stream suche und als Datei ablegen. Über die COM-Schnittstelle kann es dann im Word wieder importiert werden.
Titel: Re: Bildverwaltung...
Beitrag von: Schnulli am 14.06.07 - 11:02:45
Hi zusammen,

danke für die Hinweise.

zu 1.) hm, bin mit der ImageResolution noch nicht wirklich weitergekommen.
Habe mir jetzt einfach im Doc berechnen lassen, wie groß das Bild bei entsprechender dpi-Auflösung werden könnte. Das mit den Headern ist für mich wahrscheinlich zu komplizeirt.
Wer da also noch (einfache) Hinweise hat....

zu 2.) ok, vielen Dank schon mal

Die zwei Lösungen bei OpenNTF sind leider nicht das, was ich suchte.
Die GraphicsDemo.nsf trifft es da schon eher.
Nur leider ist der Import auf nur wenige Dateiformate beschränkt. TIF fehlt zum Beispiel, bräuchte ich aber natürlich.

Jetzt hab ich im Script dazu ein bißchen rumgebastelt, aber erkennt den Imagetype nicht und deshalb kann er kein Preview erstellen.
Geht TIF generell bei Lotus Notes nicht oder liegt es wenn dann am Script? (PNG geht wohl nicht)

Hier mal ein Ausschnitt aus dem Script:

' Open a dialogbox and allow users to select from a list of files
   ' NB: PNG is missing from here as Notes can't import PNG image types.
   files = workspace.OpenFileDialog(True, "File List", "Supported Images|*.jpg;*.bmp;*.tif;*.gif", "C:\") <-hier hab ich einfach das TIF reingebastelt
   If Isempty(files) Then Exit Sub      ' Exit if the user selects the Cancel button
   Forall FileList In files                ' Loop through the list of files selected
      Filename = Filelist            ' Get the current filename
      ' GetImageProperties returns an array of ImageType, height, width and bit-depth
      imgProps = GetImageProperties(Filename)
      ImageType = imgProps(0)      ' Get the image type, BMP-GIF-JPEG-PNG-TIF
      ImageHeight = imgProps(1)   ' Get the image height
      ImageWidth = imgProps(2)   ' Get the image width
      ImageDepth = imgProps(3)   ' Get the image bit-depth

....

' import the same file so we have a preview version.
      Set uidoc = workspace.EditDocument( True, doc )   ' Open the backend doc in the UI
      Call uidoc.GotoField( "ImageView" )                  ' Make the ImageView field the focus
      
      Select Case Imagetype                           ' Select which image type this file is
      Case "GIF":
         Call uidoc.Import("GIF Image",filename)            ' Import the GIF image into the field
         Call uidoc.fieldsettext("ImageType", "GIF Image")   '
-> hier hab ich wieder das TIF reingebastelt:
Set the Image type field
      Case "TIF":
         Call uidoc.Import("TIF Image",filename)            ' Import the TIF image into the field
         Call uidoc.fieldsettext("ImageType", "TIF Image")   ' Set the Image type field
      Case "JPEG":
         Call uidoc.Import("JPEG Image",filename)         ' Import the JPEG image into the field
         Call uidoc.fieldsettext("ImageType", "JPEG Image")   ' Set the Image type field
      Case "PNG":
         ' NB: This will never happen as Notes doesn't import PNG files although it's there if we need it
         Call uidoc.Import("PNG Image",filename)         ' Import the PNG image into the field
         Call uidoc.fieldsettext("ImageType", "PNG Image")   ' Set the Image type field
      Case "BMP":
         Call uidoc.Import("BMP Image",filename)         ' Import the BMP image into the field
         Call uidoc.fieldsettext("ImageType", "BMP Image")   ' Set the Image type field
      End Select


Viele Grüße
Iris