Modify Image IPTC

Discussion in 'ASP.NET / ASP.NET Core' started by TimCadieux, Dec 7, 2009.

  1. I've written an entire app to load and host photos, I allow the user to save IPTC in the DB and when the request a photo, I send the Photo as an attachment. I've just encountered a porblem as I cannot find any way to WRITE IPTC into the JPG before sending?? I use the below code to send the image. Does anyone knwo how I could update the IPTC before sending? The whole app depends on this.

    According to the ASPJpeg site, only version 2.0 does this, bnut DiscountAsp is running 1.8?


    HELP!

    Code:
    Dim strMem As System.IO.MemoryStream = New System.IO.MemoryStream(CType(objDataReader("img_image"), Byte()))
                    Dim strWriter As System.IO.StreamWriter = New System.IO.StreamWriter(strMem)
    
                    strWriter.Flush()
                    strMem.Position = 0
    
                    Dim attachment As System.Net.Mail.Attachment = New System.Net.Mail.Attachment(strMem, objDataReader("img_filename"), "image/jpeg")
                    MailMsg.Attachments.Add(attachment)
    
    
     
  2. Now, how is it that i've spent the last 4 days Googling the Words, Asp.net IPTC and Write and never came across this article?!?!

    ARgh!!

    Thanks for your input, i'll give it a try.
     
  3. Cool, but it seems this stuff is not entirely without problems (aka a Microsoft half implementation). I recommend you keep a note of this thread and the samples people have come up with because it might save you some hassle in the long run. There are also some jpeg code samples there that might help you.

    The other thing to note is that this has been implemented in the PresentationCore.dll so it's really a WPF thing but with a bit of luck this will still accessible on the DASP web servers.
     

Share This Page