Photo storage idea

Discussions about Diving Log 6.0 - questions and hints
Post Reply
vincenthimpe
Posts: 2
Joined: Thu Sep 12, 2019 16:30

Photo storage idea

Post by vincenthimpe »

When moving databases between computers it is a misery to move images over as they may be scattered in several subfolders and paths. Going on a hunt for all those files is very problematic.

So here is an idea for a solution
Create a button/option field that lets you convert a picture from a remote link to a static link.

Here is the technical idea :
In the folder where the divelog is stored create a subfolder called pictures : \diving log\pictures
That folder stores 'cached copies' of the images.
filenames are the path names with \ replaced by _

For example:
c:\users\vhimpe\mydocuments\pictures\trips\maui\molokini314.jpg
becomes
\diving log\pictures\C_users_vhimpe_mydocuments_pictures_trips_maui_molokini314.jpg

A general option would enable caching by default. If enabled : whenever a picture is linked a cached copy is created.
A button next to the Photo link would allow you to create a cached copy.
A Button on the toolbar would allow you to convert ALL existing links to cached links.
A button on the toolbar would allow you to refresh all cached images from their masters ( if they can be found. if not found: do not do anything )
A button on the toolbar would allow you to remove all cached links.

See attached picture

I know that this creates duplicate images but disk storage is cheap and it makes it easy to move an entire logbook , including images over from one machine to another by simply copying one folder.
Attachments
caching.jpg
caching.jpg (249.32 KiB) Viewed 4921 times
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Photo storage idea

Post by divinglog »

Thank you for the suggestion! Yes, photo path names can be getting a pain, especially when using multiple devices. But it is even more complex if you add Android, iOS and Mac devices which is also becoming very common.

There are several approaches to this problem, one of them are relative path names instead of absolute ones. Another is automatically copying photos to a common folder structure within the Diving Log folder, which is similar to your idea.

I think the solution is a mixture of both with a setting to enable/disable this feature. What I'm doing personally right now until an automatic function is available: I copy all images I'm using in my logbook to my own folder structure in the Diving Log documents folder before attaching them to the logbook:

Image1.png
Image1.png (4.91 KiB) Viewed 4918 times
vincenthimpe
Posts: 2
Joined: Thu Sep 12, 2019 16:30

Re: Photo storage idea

Post by vincenthimpe »

That's what i am doing now as well , but the problem is still moving the folder.

currently it resides at
c:\users\vhimpe\documents\divelog\pictures...

if i copy that to a different machine the path is
c:\users\vincent\documents\divelog\pictures...

as my user name is different !
so for that we would need relative paths.

I still think the easiest way would be a button next to the filename that says 'Cache this'. and then throw the copy in the \pictures subdirectory and give it the name of the sourcefile_path.

You could then easily move the data.
Kind of like what you have when selecting a dive operator or buddy ( convert to link feature , but for pictures.)
There is no risk for duplicate names if you encode the source directory+name like in my example.

I just bought a licencse by the way :) starting to enter my 1800+ dives ...
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Photo storage idea

Post by divinglog »

Yes, relative path names will solve this issue. Thank you very much for buying Diving Log! :)
reefhound
Posts: 61
Joined: Mon May 07, 2007 01:10

Re: Photo storage idea

Post by reefhound »

Relative paths have been requested for years. I'm not a fan of the caching idea. Disk storage is cheap if you buy a new disk but it may not be plentiful on existing computers.

I don't like the idea of keeping pics under "Documents/Diving Log" because that is within the user profile, which is highly likely to change on another computer. If you keep them under "Users/Public/Public Documents" then that path can remain available across computers. And while not a rule, the OS is usually on C: drive.
Post Reply