Rank: Advanced Member
Groups: Guest
Joined: 3/8/2018(UTC) Posts: 45
Thanks: 21 times
|
Hi suuport, working with TIFF images I have found problems to write the next IPTC Tags: SublocationCountry Code Attached you will find a screenshot of one image with this TAGS added with Xnview Software, but I cant add this tag with GM9.
Code:using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(@"E:\TEST\IPTC\0002.tif"))
{
Aurigma.GraphicsMill.Codecs.TiffSettings encoderOptions = new Aurigma.GraphicsMill.Codecs.TiffSettings();
//IPTC
Aurigma.GraphicsMill.Codecs.IptcDictionary iptc = new Aurigma.GraphicsMill.Codecs.IptcDictionary();
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Writer] = "EN";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Headline] = "BVNP";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Keyword] = "Press. Politics newspapers..";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Category] = "IDS";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.SupplementaryCategory] = "E371858";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.CopyrightNotice] = "DP";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Credit] = "©BVNP. BCV";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Source] = "Biblioteca. Name of the Library";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.City] = "VALÈNCIA";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.State] = "COMUNITAT VALENCIANA";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Country] = "SPAIN";
encoderOptions.Iptc = iptc;
bitmap.Save(@"E:\TEST\IPTC\salida.tif", encoderOptions);
}
Please could you help me..?? Thanks in advance.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
Hi, Sorry for the long delay. I've added this issue to our bug tracker. We'll fix it as soon as possible. |
Best regards, Eugene Kosmin The Aurigma Development Team
|
1 user thanked Eugene Kosmin for this useful post.
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/8/2018(UTC) Posts: 45
Thanks: 21 times
|
Originally Posted by: Eugene Kosmin Hi, Sorry for the long delay. I've added this issue to our bug tracker. We'll fix it as soon as possible. Any solution for this bug?? Thanks in advance.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
|
Best regards, Eugene Kosmin The Aurigma Development Team
|
1 user thanked Eugene Kosmin for this useful post.
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/8/2018(UTC) Posts: 45
Thanks: 21 times
|
Originally Posted by: Eugene Kosmin Hi Eugene, I have been testing the new version and it works ok. But I need some help. I´m trying add some IPTC and EXIF values with special characters and when I check it with Xnview, for example, the special characters are wrong. For example the copyright symbol appears as an interrogation (?). Please, how can I solve this problem...?? Thanks in advance.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/8/2018(UTC) Posts: 45
Thanks: 21 times
|
Originally Posted by: Franchi_S5 Originally Posted by: Eugene Kosmin Hi Eugene, I have been testing the new version and it works ok. But I need some help. I´m trying add some IPTC and EXIF values with special characters and when I check it with Xnview, for example, the special characters are wrong. For example the copyright symbol appears as an interrogation (?). Please, how can I solve this problem...?? Thanks in advance. No answer..?? Please I need help with this issue. Anybody here..?? Edited by user Thursday, July 26, 2018 11:25:51 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
Hi, I'm sorry for the long delay... Could you give us more steps to reproduce the problem? I've tried to generate an image with the code you provided above, and it works fine. I can see the copyright symbol in both Photoshop and xnView applications.
|
Best regards, Eugene Kosmin The Aurigma Development Team
|
1 user thanked Eugene Kosmin for this useful post.
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/8/2018(UTC) Posts: 45
Thanks: 21 times
|
Originally Posted by: Eugene Kosmin Hi, I'm sorry for the long delay... Could you give us more steps to reproduce the problem? I've tried to generate an image with the code you provided above, and it works fine. I can see the copyright symbol in both Photoshop and xnView applications.
Oh my god, I can´t understand anything. YOU ARE RIGHT. I tried it thousands of times I had symbols problems, but I have just to try it again and it works fine. Any way I post you the code. If you see anything please let me know. Thanks in advance and sorry for this confusion. Code:var reader = JpegReader.Create(fichero.FullName);
var iptc = new Aurigma.GraphicsMill.Codecs.IptcDictionary();
var exif = new ExifDictionary();
iptc = reader.Iptc;
exif = reader.Exif;
// modify the metadata
if (!(textBoxCopyright.Text == ""))
{
//byte[] bytes = Encoding.Unicode.GetBytes(textBoxCopyright.Text);
exif[ExifDictionary.Copyright] = textBoxCopyright.Text;
}
if (!(textBoxSoftware.Text == ""))
{
exif[ExifDictionary.Software] = textBoxSoftware.Text;
}
if (!(textBoxFabricante.Text == ""))
{
exif[ExifDictionary.Make] = textBoxFabricante.Text;
}
if (!(textBoxModelo.Text == ""))
{
exif[ExifDictionary.Model] = textBoxModelo.Text;
}
if (!(textBoxArtista.Text == ""))
{
exif[ExifDictionary.Artist] = textBoxArtista.Text;
}
if (!(textBoxCopyrightIPTC.Text == ""))
{
if (checkBoxExcel.Checked)
{
SUPLEMENTAL_CATEGORIES = textBoxSupCategIPTC.Text + ID_T + "," + ID_D + "," + ID_O;
}
else
{
SUPLEMENTAL_CATEGORIES = textBoxSupCategIPTC.Text;
}
if (!(textBoxAutorIPTC.Text == "")) iptc[IptcDictionary.Caption] = textBoxAutorIPTC.Text;
if (!(textBoxTitularIPTC.Text == "")) iptc[IptcDictionary.Headline] = textBoxTitularIPTC.Text;
if (!(textBoxPalabrasClaveIPTC.Text == "")) iptc[IptcDictionary.Keyword] = textBoxPalabrasClaveIPTC.Text;
if (!(textBoxCategoryIPTC.Text == "")) iptc[IptcDictionary.Category] = textBoxCategoryIPTC.Text;
if (!(SUPLEMENTAL_CATEGORIES == "")) iptc[IptcDictionary.SupplementaryCategory] = SUPLEMENTAL_CATEGORIES;
if (!(textBoxCopyrightIPTC.Text == "")) iptc[IptcDictionary.CopyrightNotice] = textBoxCopyrightIPTC.Text;
if (!(textBoxCreditsIPTC.Text == "")) iptc[IptcDictionary.Credit] = textBoxCreditsIPTC.Text;
if (!(textBoxSourceIPTC.Text == "")) iptc[IptcDictionary.Source] = textBoxSourceIPTC.Text;
if (!(textBoxCityIPTC.Text == "")) iptc[IptcDictionary.City] = textBoxCityIPTC.Text;
if (!(textBoxLocalidadIPTC.Text == "")) iptc[IptcDictionary.Sublocation] = textBoxLocalidadIPTC.Text;
if (!(textBoxProvinciaIPTC.Text == "")) iptc[IptcDictionary.State] = textBoxProvinciaIPTC.Text;
if (!(textBoxCountryIPTC.Text == "")) iptc[IptcDictionary.Country] = textBoxCountryIPTC.Text;
if (!(textBoxCountryCodeIPTC.Text == "")) iptc[IptcDictionary.CountryCode] = textBoxCountryCodeIPTC.Text;
// Save the new image
using (var writer = new JpegWriter(fichero.FullName.Replace(".jpg", "_tmp.jpg"), 90))
{
writer.Exif = exif;
writer.Iptc = iptc;
Pipeline.Run(reader + writer);
reader.Dispose();
FileInfo originalImage = new FileInfo(fichero.FullName);
// Delete the original
originalImage.Delete();
exif.Dispose();
iptc.Dispose();
}
System.IO.File.Move(fichero.FullName.Replace(".jpg", "_tmp.jpg"), fichero.FullName);
}
|
|
|
|
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.