This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
mohan tangella  
#1 Posted : Wednesday, April 15, 2015 9:59:10 PM(UTC)
mohan tangella

Rank: Member

Groups: Guest
Joined: 9/3/2014(UTC)
Posts: 10

Thanks: 1 times
Hi

Previously we had no problem applying one star rating for the image when using version 7.0.28.383, but the latest version 7.2.26 is not supporting it.

i've used below code.

Code:
using (var losslessJpeg = new Aurigma.GraphicsMill.Codecs.LosslessJpeg(sourcePath))
{
	// IPTC
	if (losslessJpeg.Iptc == null)
	{
		losslessJpeg.Iptc = new Aurigma.GraphicsMill.Codecs.IptcDictionary();
	}
	// EXIF
	if (losslessJpeg.Exif == null)
	{
		losslessJpeg.Exif = new Aurigma.GraphicsMill.Codecs.ExifDictionary();
	}

	// XMP
	var xmp = new Aurigma.GraphicsMill.Codecs.XmpData();
	if (losslessJpeg.Xmp != null)
	{
		xmp.Load(losslessJpeg.Xmp);
	}
	//Remove the XmpRating tag if it is already exists
	if (xmp.Contains(Aurigma.GraphicsMill.Codecs.XmpTagNames.XmpRating))
	{
		xmp.Remove(Aurigma.GraphicsMill.Codecs.XmpTagNames.XmpRating);
	}
	var msRatingId = "MicrosoftPhoto:Rating";

	if (xmp.Contains(msRatingId))
	{
		hasMSRatingID = true;
		xmp.Remove(msRatingId);
	}
	//Add the XmpRating tag (simple value)
	var node = new Aurigma.GraphicsMill.Codecs.XmpValueNode(
		Aurigma.GraphicsMill.Codecs.XmpNodeType.SimpleProperty, "1",
		Aurigma.GraphicsMill.Codecs.XmpTagNames.XmpRating);
	xmp.AddNode(node);

	if (hasMSRatingID)
	{
		var node2 = new Aurigma.GraphicsMill.Codecs.XmpValueNode(
				   Aurigma.GraphicsMill.Codecs.XmpNodeType.SimpleProperty, "1",
				   msRatingId);
		xmp.AddNode(node2);
	}

	losslessJpeg.Xmp = xmp.Save();

	losslessJpeg.Write(tempPath);
}

System.IO.File.Delete(sourcePath);
System.IO.File.Move(tempPath, sourcePath);

Thanks in advance..

Edited by moderator Thursday, April 23, 2015 2:23:29 AM(UTC)  | Reason: Not specified

Eugene Kosmin  
#2 Posted : Thursday, April 16, 2015 2:01:14 AM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Guest
Joined: 9/19/2006(UTC)
Posts: 505

Was thanked: 41 time(s) in 41 post(s)
Hi Mohan,

Thanks for a bug report. It works definitely wrong, and now we are investigating the problem.

I’ll let you know as soon as it will be fixed.

Best regards,

Eugene Kosmin

The Aurigma Development Team

Fedor  
#3 Posted : Thursday, April 23, 2015 3:00:29 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
We have fixed the problem. The update will be included in the upcoming version 7.5 which will be available in 2-3 weeks.
Best regards,

Fedor Skvortsov

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.