FreeImage - Write zTXt tag to PNG
This is really causing me a headache.  For some reason or another, I can't add a specific tag to a PNG file I'm creating, trying to write it using FreeImage.

Given the code;

        Dim FImage As FIBITMAP = FreeImage.CreateFromBitmap(Image)

        Dim FDesc As FITAG = FreeImage.CreateTag

        FreeImage.SetTagType(FDesc, FREE_IMAGE_MDTYPE.FIDT_ASCII)
        FreeImage.SetTagID(FDesc, 270)
        FreeImage.SetTagCount(FDesc, 1)
        FreeImage.SetTagLength(FDesc, Encoding.ASCII.GetByteCount(DescString.ToString))
        FreeImage.SetTagValue(FDesc, Encoding.ASCII.GetBytes(DescString.ToString))

        FreeImage.SetMetadata(FREE_IMAGE_MDMODEL.FIMD_XMP, FImage, "Description", FDesc)

        FreeImage.Save(FREE_IMAGE_FORMAT.FIF_PNG, FImage, fbSaveTo.SelectedPath & "\TEST.dmi", FREE_IMAGE_SAVE_FLAGS.PNG_Z_DEFAULT_COMPRESSION)

Can anyone see why the tag wouldn't be added?  Assume that Image is valid and that DescString is too (it's a stringbuilder).  I'm trying to add the Image Description tag, which I want to have written _specifically_ as a `zTXt` chunk in the PNG file, as I need to have that format in order for the file to be compatible with another target program (Dream Maker).

I know I should also be deleting the FITAG, but that's secondary (the program quits right after this anyways, so...)
FreeImage - Write zTXt tag to PNG
===

This is really causing me a headache.  For some reason or another, I can't add a specific tag to a PNG file I'm creating, trying to write it using FreeImage.

Given the code;

        Dim FImage As FIBITMAP = FreeImage.CreateFromBitmap(Image)

        Dim FDesc As FITAG = FreeImage.CreateTag

        FreeImage.SetTagType(FDesc, FREE_IMAGE_MDTYPE.FIDT_ASCII)
        FreeImage.SetTagID(FDesc, 270)
        FreeImage.SetTagCount(FDesc, 1)
        FreeImage.SetTagLength(FDesc, Encoding.ASCII.GetByteCount(DescString.ToString))
        FreeImage.SetTagValue(FDesc, Encoding.ASCII.GetBytes(DescString.ToString))

        FreeImage.SetMetadata(FREE_IMAGE_MDMODEL.FIMD_XMP, FImage, "Description", FDesc)

        FreeImage.Save(FREE_IMAGE_FORMAT.FIF_PNG, FImage, fbSaveTo.SelectedPath & "\TEST.dmi", FREE_IMAGE_SAVE_FLAGS.PNG_Z_DEFAULT_COMPRESSION)

Can anyone see why the tag wouldn't be added?  Assume that Image is valid and that DescString is too (it's a stringbuilder).  I'm trying to add the Image Description tag, which I want to have written _specifically_ as a `zTXt` chunk in the PNG file, as I need to have that format in order for the file to be compatible with another target program (Dream Maker).

I know I should also be deleting the FITAG, but that's secondary (the program quits right after this anyways, so...)