Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread Patrick Shanahan
* Sherwood Botsford  [01-29-20 15:48]:
> Hashes and other hazards:
> 
> Camera makers understand that their cameras have to work with other editing
> tools.  Making a change that encrypts the image is not going to fly very
> well.  A single bit flip results in a corrupt file.
> A hash value on part of the image could be useful for verifying that the
> image  hasn't been modified since being downloaded from the camera.  This
> would mean however that any camera maker has to come up with a unique way
> to hasn their image.  Otherwise, the user only has to recalculate the hash.
> 
> Yes:  There needs to be extensive checking with each firmware version to
> check that things don't break.  At this point you need to decide how
> paranoid to be:
> 
> * I will keep my raw images sacrosanct.  Keep them in triplicate:  One on
> my computer, one in the cloud, one in a disk in a fire/water proof data
> safe in the garage, one on a periodic backup disk stored at my dad's farm
> * I will keep the original images in a separate folder, process them once
> to give each one a unique ID.
> * I will keep original images in a separated folder, and add as much
> metadata as the file format supports to my images, figuring that images
> lost to corruption is a lower risk than images lost to bad indexing.  At
> some point when I need disk space I discard the originals.
> * I will just keep my dozen memory cards in a box in my desk, figuring that
> metadata induced corruption will show up before I start to recycle the
> cards.
> * I'll download the images, reformat the card, and when a problem shows up,
> go out and reshoot the event.
> 
> I'm probably about a #3 or #4 right now.
> 
> Benefits:  I have been bitten by the "I can't find the original" of this
> image several times, and I only have about 40,000 images.  In some cases I
> had to use a similar image.  In a few I've had to reshoot an image.
>  I have only once had a loss of images cause by a software malfunction --
> and that was Nikon's own software.
> 
> 
> 
> 
> 
> Regards
> 
> Sherwood
> 
> 
> 
> On Wed, 29 Jan 2020 at 13:00,  wrote:
> 
> > What would you do when camera makers decided to store a cryptographic
> > hash or even a signature created over the image and other metadata?
> > You'd invalidate the whole image.
> >
> > I'm not saying they do, but one day they might.  Would be a nice
> > feature to certify to some extent how the image was taken.
> >
> > If you want to bet your images on the belief that some spare time
> > programmers can always keep up with each and every turn
> > multi-million-dollar companies do on their undocumented, proprietary
> > formats, be my guest.  And bring popcorn.
> >
> > I see no benefit that would outweigh the risk.
> >
> >
> > --
> > Dr. Stefan Klinger -- Informatiker, Mathematiker  o/X
> > https://stefan-klinger.de /\/
> > I prefer receiving plain text messages, not exceeding 32kB. \
> >
> > 
> > darktable user mailing list
> > to unsubscribe send a mail to
> > darktable-user+unsubscr...@lists.darktable.org
> >
> >
> 
> 
> darktable user mailing list
> to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org


Then why not utilize darktable to perform the orientation maneuver or
incorrect date/location/...  that you forgot to apply in camera and forgo
gambling that you will not corrupt your original images and need to
maintain complicated backup's that do not truly reflect your images?

Do you plan to provide your raw images to a client or the public?  Me
thinks you love taking extra unnecessary steps for little reason.

and top-posting, full-quoting, ... 


-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode

darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org



Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread Sherwood Botsford
Hashes and other hazards:

Camera makers understand that their cameras have to work with other editing
tools.  Making a change that encrypts the image is not going to fly very
well.  A single bit flip results in a corrupt file.
A hash value on part of the image could be useful for verifying that the
image  hasn't been modified since being downloaded from the camera.  This
would mean however that any camera maker has to come up with a unique way
to hasn their image.  Otherwise, the user only has to recalculate the hash.

Yes:  There needs to be extensive checking with each firmware version to
check that things don't break.  At this point you need to decide how
paranoid to be:

* I will keep my raw images sacrosanct.  Keep them in triplicate:  One on
my computer, one in the cloud, one in a disk in a fire/water proof data
safe in the garage, one on a periodic backup disk stored at my dad's farm
* I will keep the original images in a separate folder, process them once
to give each one a unique ID.
* I will keep original images in a separated folder, and add as much
metadata as the file format supports to my images, figuring that images
lost to corruption is a lower risk than images lost to bad indexing.  At
some point when I need disk space I discard the originals.
* I will just keep my dozen memory cards in a box in my desk, figuring that
metadata induced corruption will show up before I start to recycle the
cards.
* I'll download the images, reformat the card, and when a problem shows up,
go out and reshoot the event.

I'm probably about a #3 or #4 right now.

Benefits:  I have been bitten by the "I can't find the original" of this
image several times, and I only have about 40,000 images.  In some cases I
had to use a similar image.  In a few I've had to reshoot an image.
 I have only once had a loss of images cause by a software malfunction --
and that was Nikon's own software.





Regards

Sherwood



On Wed, 29 Jan 2020 at 13:00,  wrote:

> What would you do when camera makers decided to store a cryptographic
> hash or even a signature created over the image and other metadata?
> You'd invalidate the whole image.
>
> I'm not saying they do, but one day they might.  Would be a nice
> feature to certify to some extent how the image was taken.
>
> If you want to bet your images on the belief that some spare time
> programmers can always keep up with each and every turn
> multi-million-dollar companies do on their undocumented, proprietary
> formats, be my guest.  And bring popcorn.
>
> I see no benefit that would outweigh the risk.
>
>
> --
> Dr. Stefan Klinger -- Informatiker, Mathematiker  o/X
> https://stefan-klinger.de /\/
> I prefer receiving plain text messages, not exceeding 32kB. \
>
> 
> darktable user mailing list
> to unsubscribe send a mail to
> darktable-user+unsubscr...@lists.darktable.org
>
>


darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org

Re: [darktable-user] lua creating (ephemeral?) collection

2020-01-29 Thread August Schwerdfeger
Last I checked (Darktable 2.6), the Lua API provided an interface to change
the on-screen collection arbitrarily, but not to use the collection queries
independently of what was shown on screen.

--
August Schwerdfeger
aug...@schwerdfeger.name

On Wed, Jan 29, 2020 at 2:28 PM Niranjan Rao  wrote:

> You probably tried this and were not happy, but just want to confirm.
> Have you checked collect images in lighttable view? It does allow you to
> search on various aspects and essentially does the same SQL others are
> talking about - but from the safety of darktable. Once you have
> selection, you can operate normally as you would otherwise do it. For
> example you can easily specify tag="this" and ISO=that from the GUI.
>
> I have not used 3.0, but I doubt if they have taken this kind of
> functionality away.
>
> Without knowing LUA scripts, most likely this kind functionality is
> exposed somewhere in the scripts.
>
> Regards,
>
> Niranjan
> On 1/21/20 6:11 PM, Greg Minshall wrote:
> > but, it appears that, at least absent a GUI (and this would be a command
> > line script), there isn't a way of creating a new (ephemeral or
> > permanent) collection, applying filters to it, etc.
>
>
>
> 
> darktable user mailing list
> to unsubscribe send a mail to
> darktable-user+unsubscr...@lists.darktable.org
>
>


darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org

Re: [darktable-user] lua creating (ephemeral?) collection

2020-01-29 Thread Niranjan Rao
You probably tried this and were not happy, but just want to confirm. 
Have you checked collect images in lighttable view? It does allow you to 
search on various aspects and essentially does the same SQL others are 
talking about - but from the safety of darktable. Once you have 
selection, you can operate normally as you would otherwise do it. For 
example you can easily specify tag="this" and ISO=that from the GUI.


I have not used 3.0, but I doubt if they have taken this kind of 
functionality away.


Without knowing LUA scripts, most likely this kind functionality is 
exposed somewhere in the scripts.


Regards,

Niranjan
On 1/21/20 6:11 PM, Greg Minshall wrote:

but, it appears that, at least absent a GUI (and this would be a command
line script), there isn't a way of creating a new (ephemeral or
permanent) collection, applying filters to it, etc.




darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org



Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread Sherwood Botsford
First of all, I wouldn't use a hex editor, but use an existing tool, such
as Phil's exif tool.

Orientation is an exif tag
0x0112 *Orientation* int16u IFD0
1 = Horizontal (normal)
2 = Mirror horizontal
3 = Rotate 180
4 = Mirror vertical
5 = Mirror horizontal and rotate 270 CW
6 = Rotate 90 CW
7 = Mirror horizontal and rotate 90 CW
8 = Rotate 270 CW

Regards

Sherwood



On Wed, 29 Jan 2020 at 11:42, Myron Gochnauer  wrote:

> Hi Sherwood,
>
> Thanks for the advice and info.  Very helpful.
>
> I was aware of some of the risks of using a hex editor to change program
> files (and similar files). For a few years back in the early/mid 80's I had
> to tweak my favorite word processor (XyWrite) so that it would work with a
> Hyperion computer, whose character table was non-standard.  I seem to
> recall tweaking a modem driver too. (300 baud. Wow! I could read email
> messages as they scrolled in. Pre-spam days… sigh.)
>
> Re image orientation numerical values:  How can I find out what numbers
> are "generally regarded as meaningful"?  I would expect any competently
> written program to handle out-of-range numbers 'gracefully' as long as they
> occupied the same number of bits. (Graceful = ignore or substitute a
> default, with or without an error message)
>
> I like your 'extended copyright' idea. Would you be willing to share the
> script you use replace the placeholding X's? I assume you automate the
> ExifTool???   Looking at ExifTool's instructions and examples is near the
> top of my "I've gotta learn that!" list (up there with Brahms Op.79,
> controlling DC motor speeds, and figuring out the network wiring in my
> house). 
>
> (On Mac, I use A Better Finder Rename to rename imported raw files to Exif
> date & time,  making on-disk file organization by date/time dead simple,
> but I don't think it gives access to other exif data.)
>
> Myron
>
>
> --
> *From:* Sherwood Botsford 
> *Sent:* January 29, 2020 12:16 PM
> *To:* dt-user list 
> *Subject:* Re: [darktable-user] Semi-OT: setting orientation
>
>
> ✉External message: Use caution.
> If you are going to experiment with editing raw files, some risk factors:
>
> From reading Phil's exif web site, and other stuff I didn't bookmark
> corruption risk:
>
> Safest:
> 1. Editing standard metadata (Exif, ITPC)  replacing a value with one of
> the same size.  Image orientation would be one of these, I think, having a
> value of 0-3 (but check the range.  Suppose it is 0 to3 and you put in 5?
> Will other software ignore it, only pay attention to the smallest two bits
> of the number, interpreting it as a 1, go wandering off into a cloud of
> blue bits and crash?)
> 2. Editing standard metadata replacing a value with one that is smaller.
> Some fields are text strings, and so can be padded with blanks, changing
> the problem to that of problem 1.
> 3. Editing makernotes data.  This is propriatary to the camara maker, and
> it's format can vary with both model and firmware version.
> 4. Editing preview images.  The big risk here is that the size of the
> preview will change, and whatever you edit with won't leave the end of the
> data in the same place, potentially clobbering the front end of the raw
> data.
> 5. Editing uncompressed raw data.
> 6. Editing compressed raw data.
> Most risky.
>
> One of my ideas is to deliberately in my camera put an extended copyright
> notice such as
>
> Copyright S. G. Botsford 2020 -- Image ID
> Nikon-D7100-S.7614346-----
>
> Then, with a script read the exif date, and the shutter count, and replace
> the string of X's with the date and shutter count.
>
> This gives a unique ID trackable back to me for the image.  I don't know
> if all cameras write an ITPC core section in the meta data, or if this
> field is in the maker notes.
>
> In all derived files, copy this information to a few other fields.  Not
> all photo editors respect metadata. Your image database tracks this.
>
> * You edited a bunch of images with Photoshop, saved under different
> names.  -- you still have a way to connect the .PSD, the resulting TIFF
> with the original RAW.
> * Your assistant used a file browser to "organize" your image archive.  --
> you can reconnect xmp files with masters.
> * Your database has crashed, taking everything with it.  XMP files can be
> reconnected with masters even if names are in doubt.
> * You exported a bunch of images.  Someone wants a modification that will
> work better if starting from the original.
>
> It doesn't work for all cameras.  iPhones don't have a shutter count, nor
> AFAIK a raw format available to the public.
>
>
>
> Regards
>
> Sherwood
>
>
>
> On Wed, 29 Jan 2020 at 05:43, Patrick Shanahan  wrote:
>
> * Myron Gochnauer  [01-29-20 03:05]:
> > Several people suggested trying exiftool… carefully!!  (I’ve been burned
> often enough to know you only experiment on copies.)
> >
> > Anyway, exiftool -a -u -g1 {fname} showed the following results:
> >
> > “Orientation : 

Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread dt-list
What would you do when camera makers decided to store a cryptographic
hash or even a signature created over the image and other metadata?
You'd invalidate the whole image.

I'm not saying they do, but one day they might.  Would be a nice
feature to certify to some extent how the image was taken.

If you want to bet your images on the belief that some spare time
programmers can always keep up with each and every turn
multi-million-dollar companies do on their undocumented, proprietary
formats, be my guest.  And bring popcorn.

I see no benefit that would outweigh the risk.


-- 
Dr. Stefan Klinger -- Informatiker, Mathematiker  o/X
https://stefan-klinger.de /\/
I prefer receiving plain text messages, not exceeding 32kB. \

darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org



Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread Sherwood Botsford
If you are going to experiment with editing raw files, some risk factors:

>From reading Phil's exif web site, and other stuff I didn't bookmark
corruption risk:

Safest:
1. Editing standard metadata (Exif, ITPC)  replacing a value with one of
the same size.  Image orientation would be one of these, I think, having a
value of 0-3 (but check the range.  Suppose it is 0 to3 and you put in 5?
Will other software ignore it, only pay attention to the smallest two bits
of the number, interpreting it as a 1, go wandering off into a cloud of
blue bits and crash?)
2. Editing standard metadata replacing a value with one that is smaller.
Some fields are text strings, and so can be padded with blanks, changing
the problem to that of problem 1.
3. Editing makernotes data.  This is propriatary to the camara maker, and
it's format can vary with both model and firmware version.
4. Editing preview images.  The big risk here is that the size of the
preview will change, and whatever you edit with won't leave the end of the
data in the same place, potentially clobbering the front end of the raw
data.
5. Editing uncompressed raw data.
6. Editing compressed raw data.
Most risky.

One of my ideas is to deliberately in my camera put an extended copyright
notice such as

Copyright S. G. Botsford 2020 -- Image ID
Nikon-D7100-S.7614346-----

Then, with a script read the exif date, and the shutter count, and replace
the string of X's with the date and shutter count.

This gives a unique ID trackable back to me for the image.  I don't know if
all cameras write an ITPC core section in the meta data, or if this field
is in the maker notes.

In all derived files, copy this information to a few other fields.  Not all
photo editors respect metadata. Your image database tracks this.

* You edited a bunch of images with Photoshop, saved under different
names.  -- you still have a way to connect the .PSD, the resulting TIFF
with the original RAW.
* Your assistant used a file browser to "organize" your image archive.  --
you can reconnect xmp files with masters.
* Your database has crashed, taking everything with it.  XMP files can be
reconnected with masters even if names are in doubt.
* You exported a bunch of images.  Someone wants a modification that will
work better if starting from the original.

It doesn't work for all cameras.  iPhones don't have a shutter count, nor
AFAIK a raw format available to the public.



Regards

Sherwood



On Wed, 29 Jan 2020 at 05:43, Patrick Shanahan  wrote:

> * Myron Gochnauer  [01-29-20 03:05]:
> > Several people suggested trying exiftool… carefully!!  (I’ve been burned
> often enough to know you only experiment on copies.)
> >
> > Anyway, exiftool -a -u -g1 {fname} showed the following results:
> >
> > “Orientation : Horizontal (normal)” - - - in exif of NEF landscape
> format image file.
> >
> > "Orientation : Rotate 270 CW” - - - in exif of RAF portrait format image
> file.
> >
> > I’ll see if I can figure out how to edit those values.  (I’m a total
> newbie with exiftool.)
> >
> > It *does* seem like there is a place for a GUI app, complete with error
> checking, for altering exif information.  If nothing else, I’m pretty sure
> that *everyone* sooner or later produces a bunch of images with last year’s
> copyright information, the wrong time, or some other annoying error.
>
> A "mantra" of darktable is to not touch in any way the "raw" image.
> Editing with exiftool or exiv2 both will make changes to the "raw" image
> file with unknown now or future consequences.
>
> You by using darktable have opted to use a photo editor which does not
> change in any way the "raw" image.  Why contradict that by makeing changes
> with another apt?
>
> It is no more work to rotate the images using darktable.  And darktable
> will store the image orientation that you determine within the xmp file
> and the library.  Maintain backups of your library and your raw image
> files and their accompanying xmp files and your orientation will also be
> retained.
>
> Do what you want with exported images, you have an original now so you can
> always make another.
>
> And a bonus, no need to research exiftool/exiv2 and craft commandline
> parameters to rotate your images.
>
> ps: does your chosen email client not make line wrapping available for
> you?  Maybe time to change.
>
>
> --
> (paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
> http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
> Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode
>
> 
> darktable user mailing list
> to unsubscribe send a mail to
> darktable-user+unsubscr...@lists.darktable.org
>
>


darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org



Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread Patrick Shanahan
* Myron Gochnauer  [01-29-20 03:05]:
> Several people suggested trying exiftool… carefully!!  (I’ve been burned 
> often enough to know you only experiment on copies.)
> 
> Anyway, exiftool -a -u -g1 {fname} showed the following results:
> 
> “Orientation : Horizontal (normal)” - - - in exif of NEF landscape format 
> image file.
> 
> "Orientation : Rotate 270 CW” - - - in exif of RAF portrait format image file.
> 
> I’ll see if I can figure out how to edit those values.  (I’m a total newbie 
> with exiftool.)
> 
> It *does* seem like there is a place for a GUI app, complete with error 
> checking, for altering exif information.  If nothing else, I’m pretty sure 
> that *everyone* sooner or later produces a bunch of images with last year’s 
> copyright information, the wrong time, or some other annoying error.

A "mantra" of darktable is to not touch in any way the "raw" image. 
Editing with exiftool or exiv2 both will make changes to the "raw" image
file with unknown now or future consequences.

You by using darktable have opted to use a photo editor which does not
change in any way the "raw" image.  Why contradict that by makeing changes
with another apt?

It is no more work to rotate the images using darktable.  And darktable
will store the image orientation that you determine within the xmp file
and the library.  Maintain backups of your library and your raw image
files and their accompanying xmp files and your orientation will also be
retained.

Do what you want with exported images, you have an original now so you can
always make another.

And a bonus, no need to research exiftool/exiv2 and craft commandline
parameters to rotate your images.

ps: does your chosen email client not make line wrapping available for
you?  Maybe time to change.


-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode

darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org



Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread Richard Hobday

There is a GUI for exiftool, but it still requires you to take the
responsibility for any changes you choose to make !!!

See: https://hvdwolf.github.io/pyExifToolGUI/

Tread carefully there be Dragons 



On 29/01/2020 02:33, Myron Gochnauer wrote:

Several people suggested trying exiftool… carefully!!  (I’ve been burned
often enough to know you only experiment on copies.)

Anyway, exiftool -a -u -g1 {fname} showed the following results:

“Orientation : Horizontal (normal)” - - - in exif of NEF landscape
format image file.
"Orientation : Rotate 270 CW” - - - in exif of RAF portrait format
image file.


I’ll see if I can figure out how to edit those values.  (I’m a total
newbie with exiftool.)

It *does* seem like there is a place for a GUI app, complete with error
checking, for altering exif information.  If nothing else, I’m pretty
sure that *everyone* sooner or later produces a bunch of images with
last year’s copyright information, the wrong time, or some other
annoying error.

Thanks for the help.

Myron

darktable user mailing list to unsubscribe send a mail to
darktable-user+unsubscr...@lists.darktable.org



darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org



Re: [darktable-user] Semi-OT: setting orientation

2020-01-29 Thread Myron Gochnauer
Several people suggested trying exiftool… carefully!!  (I’ve been burned often 
enough to know you only experiment on copies.)

Anyway, exiftool -a -u -g1 {fname} showed the following results:

“Orientation : Horizontal (normal)” - - - in exif of NEF landscape format image 
file.

"Orientation : Rotate 270 CW” - - - in exif of RAF portrait format image file.

I’ll see if I can figure out how to edit those values.  (I’m a total newbie 
with exiftool.)

It *does* seem like there is a place for a GUI app, complete with error 
checking, for altering exif information.  If nothing else, I’m pretty sure that 
*everyone* sooner or later produces a bunch of images with last year’s 
copyright information, the wrong time, or some other annoying error.

Thanks for the help.

Myron


darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.or