I am currently evaluating the Imaging SDK for a project, and have encountered a problem. I load a Wang-annotated TIFF, which shows the annotations in the WPF demo just fine. And then I want to save it, baking in the annotations to the image. But when I open the saved jpg file, the annotations are not in it.
You have not loaded image and annotations in memory - in this case encoder copies image data without loading the whole image into memory. Also encoder copies annotations as metadata if encoder supports annotations metadata format. JPEG encoder does not support WANG annotations and it does not copies annotations.
For copying WANG annotation from TIFF file into JPEG file you need load annotations into memory:
ImageCollection images = new ImageCollection();
images.Add("test.tif");
AnnotationDataController annoDataController = new AnnotationDataController(images);
// load annotations into memory - after this step encoder will be able to get "unpacked" annotations
// from memory and save annotations to the necessary format
AnnotationDataCollection annoDataCollection = annoDataController[0];
JpegEncoder jpegEncoder = new JpegEncoder();
jpegEncoder.AnnotationsFormat = AnnotationsFormat.VintasoftXmp;
images[0].Save("test.jpg", jpegEncoder);
Sorry for reviving an old thread here, but there is another problem.
When converting TIFF files to PNG, rectangle annotations work fine (color/alpha and shape) but line annotations are not interpreted correctly. In the original, the lines are transparent with rounded corners, but in the result PNG produced via VintasoftImaging, these lines are NOT transparent and do not have rounded edges. While I personally don't care whether the edges are round or corners (and I'm pretty sure the customer won't either), the missing transparency causes these annotations to cover up important text.
Is this a known bug in version 8.3? Right now I unfortunately don't have access to the originals to attach an image, but maybe this description can already help.
Small update, it will take another week for me to get you the samples, since I don't have the software needed yet, to create some sample files for you to use. Once I do, I will send them to you. Code wise, you can see the errors when opening the tiff in your own sample application, so I do not think, sending code is necessarily required.
The distributive package of VintaSoft Imaging .NET SDK does not have image files with WANG annotations. Please let me know the steps, which we should do for reproducing your problem.