topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday August 3, 2020, 3:36 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: JPG Bogus Metadata Replication to Subsequent Captures  (Read 363 times)

Jeffrey Klute

  • Supporting Member
  • Joined in 2020
  • **
  • Posts: 10
  • Data Vision Services
    • View Profile
    • Donate to Member
JPG Bogus Metadata Replication to Subsequent Captures
« on: July 14, 2020, 09:41 PM »
This bug happens when SC is used to view or was focused on an image that has metadata from a camera or a photo editing program and another JPG capture is made.

Preferences:
Advanced Tweaking > Image File Format > Default Image File Format: JPG
The Basics > File Naming > New Screenshot File Template > Automatically generate comment/note for each capture:
  %filename%
  %datetime%
  %windowtitle%
  %scrapetext%
  Note that the comment/note can be disabled completely and the bug persists, i.e. subsequent captures after viewing or focusing on an image with metadata have bogus replicated metadata.

The bug is persistant, in that once there is a Screenshot made that picks up this bogus metadata it will be replicated to all future captures by virtue of the fact that each of these are the last focused or viewed Screenshot (see below).

The bug is multi-platform (observed on Win7x64, Win7x86 and XP SP3).

The bug is multi-version, observed with SC versions 3.08.01, 4.15.0, 4.16.1, 4.29.0 and 4.36.2.

You can use Jeffrey Friedl’s Image Metadata Viewer to see the metadata for these examples or your own tests: http://exif.regex.info/exif.cgi

In my examples I use Nikon's ViewNX 2 to view and manipulate the image metadata.

Example #1
1) Make a "clean" capture file, here's my example and the metadata:
  20200714 201903 Screenshot.jpg
  20200714 202105 Screenshot.jpg
  Note that SC has inserted the caption as desired and set in Preferences
2) Use a photo editing program to replace the metadata Description created by SC in the "clean" capture made above with another Description, here's the result and the metadata:
  20200714 201903 Screenshot Copy.jpg
  20200714 202605 Screenshot.jpg
3) View that image with SC and take another capture, here's my result and the metadata:
  20200714 203054 Screenshot.jpg
  20200714 203305 Screenshot.jpg
Note that the new capture has picked up the Description from the previous capture, and that the screenshot of the ViewNX 2 metadata also has bogus metadata replicated from the photo-edited file. SC fails to write the caption as desired and set in Preferences and defaults to writing metadata from the last viewed file, over and over again.

Example #2
There is nothing special about this photo, it is straight from an Apple iPhone 11 Pro Max:
  IMG_0168.JPG
1) Copy this image to the folder where captures are made OR navigate to the folder where it resides using SC: View it with SC
2) Immediately take another capture: screenshot or scan, it does not matter
3) Examine the metadata of the subsequent capture and note that it includes the metadata from the iPhone image (Date Shot, Camera Info, Exposure)
For those that might be afraid of what Apple is doing with the metadata in the files the iPhone produces: I've observed this bug in SC with JPGs created by a Nikon D300s and an Android phone. I've also observed it with JPGs created by photo editing softwares Nikon ViewNX 2 and Adobe Photoshop.

Workarounds
1) Use SC to view a "clean" JPG with metadata that at most was placed there by SC itself. Subsequent captures have proper metadata. A photo editing program can be used to remove all metadata from an image, I use ViewNX 2 > Ctl-E (Convert Files) > "Remove camera setting information" and "Remove XMP/IPTC information".
2) Empty the default folder where screenshots are made (Advanced Tweaking > My Favorites > Favorite directories > Startup directory), exit SC and restart it. Subsequent captures have proper metadata.
As long as SC is not used to view or edit a camera photo with metadata or a screenshot with the bogus metadata it functions correctly.

I use SC to add graphics to photos I've shot with a camera, so this bug has been a "big pain in the butt." It took me close to two years before I realized specifically when/how/where/why this bogus metadata replication starts. Although I know now the extra steps needed to avoid it, the bug should be fixed.

Thank you for any information you can give me concerning this issue.
Necessity and Desire are the Mother and Father of Invention
« Last Edit: July 14, 2020, 10:11 PM by Jeffrey Klute »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,323
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: JPG Bogus Metadata Replication to Subsequent Captures
« Reply #1 on: July 14, 2020, 10:23 PM »
Thank you for the report -- that sounds like it must have been frustrating to be trying to figure out the cause -- I'm sorry it was SC doing it!
I will fix asap -- I'll try to get out a new version by monday.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,323
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: JPG Bogus Metadata Replication to Subsequent Captures
« Reply #2 on: July 14, 2020, 10:32 PM »
I'll surely find this info myself when I try testing solutions, but if you can help shed some light it would be useful:

1. I understand you to be saying that after you view an image file with meta data added from a non-SC source (like a camera photo or meta data editor), then NEW screen captures by SC carry over the meta data from the viewed file, instead of getting good new meta data (caption) that they should have from a new capture.

2. Is it also the case that SC does some bad changing of the metadata of other files that you view, modify, and save?  Or is it only ever that NEW captures get the meta data from the last viewed non-SC file?

Jeffrey Klute

  • Supporting Member
  • Joined in 2020
  • **
  • Posts: 10
  • Data Vision Services
    • View Profile
    • Donate to Member
Re: JPG Bogus Metadata Replication to Subsequent Captures
« Reply #3 on: July 14, 2020, 10:39 PM »
1. I understand you to be saying that after you view an image file with meta data added from a non-SC source (like a camera photo or meta data editor), then NEW screen captures by SC carry over the meta data from the viewed file, instead of getting good new meta data (caption) that they should have from a new capture.

YES, that is what is happening. Usually when this happens I'm not just viewing them with SC, I'm also editing them to add graphics. But I've reduced it down to the fact that all you have to do is view it, then make another capture.

2. Is it also the case that SC does some bad changing of the metadata of other files that you view, modify, and save?  Or is it only ever that NEW captures get the meta data from the last viewed non-SC file?

There may be such behavior, but I haven't isolated it. That is, it could be happening (there's a lot of metadata in a typical image) but I haven't noticed it change the metadata. For example, I can focus SC on an image file and add graphics to the image, save that as another version, and the metadata appears to be as from the original file. But as it has been a long time since I needed to do this, I don't know. Further testing would be needed.

However, the question is mute: all images viewed and edited with SC that have more than the basic metadata that SC inserts will cause SC to replicate that metadata to subsequent captures (until a "clean" image is viewed or focused on with SC).
Necessity and Desire are the Mother and Father of Invention

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,323
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: JPG Bogus Metadata Replication to Subsequent Captures
« Reply #4 on: July 14, 2020, 10:54 PM »
Understood.

It looks like it may have been a simple flaw in the way I was clearing EXIF meta data (affecting jpgs) on new captures.
The fact that SC normally uses PNG format may explain why the bug hasn't been reported until now.

Can you try this quick beta 4.39 version to see if it solves the problem:

Just install on top of existing version.

Jeffrey Klute

  • Supporting Member
  • Joined in 2020
  • **
  • Posts: 10
  • Data Vision Services
    • View Profile
    • Donate to Member
Re: JPG Bogus Metadata Replication to Subsequent Captures
« Reply #5 on: July 14, 2020, 11:18 PM »
I use JPG as the default format because I'm a photographer and I need the ability to add a lot of different metadata items to the photos in order to be able to organize and search my collection of 500,000 images. PNG may be better for screenshots, but I use a variety of images with SC, and so I prefer to stick with JPG.

Yes, I found with an exhaustive search that the bug had not been reported yet. That is typical for me, I find flaws where very few other people usually go, using features and capabilities beyond the basic.

I need time to test your beta 4.39 version. It may be a day or two before I get back to you. If you find out anything in the meanwhile, please let me know.
Necessity and Desire are the Mother and Father of Invention

Jeffrey Klute

  • Supporting Member
  • Joined in 2020
  • **
  • Posts: 10
  • Data Vision Services
    • View Profile
    • Donate to Member
Re: JPG Bogus Metadata Replication to Subsequent Captures
« Reply #6 on: July 16, 2020, 03:35 AM »
Can you try this quick beta 4.39 version to see if it solves the problem:
    Setup exe version

Yes, I tested beta 4.39. You squashed that bug and swept it under the rug )))

I could not find the critter in three quick tests:
1) SC used to view/focus on a screenshot that had bogus metadata replicated from previous shots, shot another screenshot.
2) SC used to view/focus on IMG_0168.jpg (given as example 2 in my original post), shot another screenshot.
3) ViewNX 2 used to edit the Description on a capture, SC used to view/focus on it, shot another screenshot.

In all cases tested so far the caption is as it should be, no replicated metadata from previously viewed capture.

Next time I swing by where I was born I'll hunt you up and I'll buy you a beer )))
Necessity and Desire are the Mother and Father of Invention
« Last Edit: July 16, 2020, 03:42 AM by Jeffrey Klute, Reason: Additional final text »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,323
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: JPG Bogus Metadata Replication to Subsequent Captures
« Reply #7 on: July 16, 2020, 12:52 PM »
Great  :Thmbsup:

Thanks for your help in identifying the problem!  I'm sure others who suffered this mysterious bug will be happen to have it fixed.