public FSpot.Iptc.IptcFile GetIptc() { string name = PhotoshopSignature.Name; JpegHeader.Marker marker = FindMarker(PhotoshopSignature); if (marker != null) { int len = name.Length; using (System.IO.Stream bimstream = new System.IO.MemoryStream(marker.Data, len, marker.Data.Length - len, false)) { FSpot.Bim.BimFile bim; try { bim = new FSpot.Bim.BimFile(bimstream); } catch { // Bim entry with marker "PHUT" is not handled by Bim.cs return(null); } // FIXME: What about EntryType.XMP ? FSpot.Bim.Entry iptc_entry = bim.FindEntry(FSpot.Bim.EntryType.IPTCNAA); if (iptc_entry == null) { return(null); } using (System.IO.Stream iptcstream = new System.IO.MemoryStream(iptc_entry.Data)) { FSpot.Iptc.IptcFile iptc = new FSpot.Iptc.IptcFile(iptcstream); return(iptc); } } } return(null); }
public void Select(SemWeb.StatementSink sink) { FSpot.Tiff.Header exif = GetExifHeader(); if (exif != null) { exif.Select(sink); } XmpFile xmp = GetXmp(); if (xmp != null) { xmp.Select(sink); } string name = PhotoshopSignature.Name; JpegHeader.Marker marker = FindMarker(PhotoshopSignature); if (marker != null) { int len = name.Length; using (System.IO.Stream bimstream = new System.IO.MemoryStream(marker.Data, len, marker.Data.Length - len, false)) { FSpot.Bim.BimFile bim = new FSpot.Bim.BimFile(bimstream); bim.Select(sink); } } }
public FSpot.Iptc.IptcFile GetIptc () { string name = PhotoshopSignature.Name; JpegHeader.Marker marker = FindMarker (PhotoshopSignature); if (marker != null) { int len = name.Length; using (System.IO.Stream bimstream = new System.IO.MemoryStream (marker.Data, len, marker.Data.Length - len, false)) { FSpot.Bim.BimFile bim; try { bim = new FSpot.Bim.BimFile (bimstream); } catch { // Bim entry with marker "PHUT" is not handled by Bim.cs return null; } // FIXME: What about EntryType.XMP ? FSpot.Bim.Entry iptc_entry = bim.FindEntry (FSpot.Bim.EntryType.IPTCNAA); if (iptc_entry == null) return null; using (System.IO.Stream iptcstream = new System.IO.MemoryStream (iptc_entry.Data)) { FSpot.Iptc.IptcFile iptc = new FSpot.Iptc.IptcFile (iptcstream); return iptc; } } } return null; }
public void Select (SemWeb.StatementSink sink) { FSpot.Tiff.Header exif = GetExifHeader (); if (exif != null) exif.Select (sink); XmpFile xmp = GetXmp (); if (xmp != null) xmp.Select (sink); string name = PhotoshopSignature.Name; JpegHeader.Marker marker = FindMarker (PhotoshopSignature); if (marker != null) { int len = name.Length; using (System.IO.Stream bimstream = new System.IO.MemoryStream (marker.Data, len, marker.Data.Length - len, false)) { FSpot.Bim.BimFile bim = new FSpot.Bim.BimFile (bimstream); bim.Select (sink); } } }