Jump to content


Photo

Replace image with same one, but new format? (JPG --> TIF)


  • Please log in to reply
13 replies to this topic

#1 strathglass

strathglass

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 26 May 2020 - 10:44 PM

Is there an easy way to update Rootsmagic so that it uses a TIF version of a file I have created to replace the original JPG version currently in my media gallery (and refereced in various places)?

The actual  folder name, and media file's leaf name (without extension) will not change ... just the extension.

I want to make a bunch of such changes.

 

(It is possible the Fix Broken Links... function is smart enough to do this, but haven't actually tried that myself yet to see.)

 



#2 zhangrau

zhangrau

    Advanced Member

  • Members
  • PipPipPip
  • 1595 posts

Posted 27 May 2020 - 05:52 AM

If you are changing only some media from JPG to TIF, then I think you'll need to do this manually, one image at a time.

Navigate to any person linked to that image, and open the Media Album.

Use the [Properties] button to display the image, then the [Change media file] button to switch from JPG to TIF version.

If an image is linked to multiple people and/or facts, you only need to do this to ONE occurrence, and RM will update all of the other links.

Time consuming, at best.

 

If you are changing EVERY one of your JPGs to TIF, there's another RM tool.

Go to menu Search, then Search and Replace:

.  Field to search: Multimedia filenames

.  Search for: .jpg

.  Replace with: .tif

Notice that I included the period "." before both JPG and TIF. It's unlikely that "jpg" will occur other than the extension, even less likely that ".jpg" will....



#3 strathglass

strathglass

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 27 May 2020 - 07:00 AM

Thanks! That gives a way forward..unfortunately it probably won't be all files, but maybe I will go that way!



#4 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6448 posts

Posted 28 May 2020 - 05:52 PM

A way to do a batch is to move the files you are converting to a new temp folder where you run a batch conversion utility. Use Windows PowerShell or command line to get a listing of all the filenames. Use that list to create a script to update the MediaTable of your RM database with the new extension. Move the converted files back to from whence they came.

Tom user of RM7630 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#5 strathglass

strathglass

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 29 May 2020 - 09:41 PM

A way to do a batch is to move the files you are converting to a new temp folder where you run a batch conversion utility. Use Windows PowerShell or command line to get a listing of all the filenames. Use that list to create a script to update the MediaTable of your RM database with the new extension. Move the converted files back to from whence they came.

Oh ... that sounds interesting!

How would I update the media table?

Is this related to the sqllite tools? I would like to know more if so (although I've never done any real work with SQL and databases, I actually have a programming background, so would be willing to try!).



#6 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6448 posts

Posted 30 May 2020 - 08:39 AM

Visit this page to learn a bit about using SQLite on a RM database and the design of same.
 

Media – Bulk Rename and Relink may illustrate what I was describing and perhaps can be adapted to your special case.


Tom user of RM7630 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#7 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3982 posts

Posted 30 May 2020 - 08:42 AM

zhangrau already provided the answer. After converting all your .JPG files to .TIF files, from the RM user interface you can do a global replace of the string ".JPG" in your media filenames with the string ".TIF". This can be done without resort to SQLite. The reason is works is that the rest of the file name is not changed. Changing media filenames in RM is generally speaking a pretty fraught process. But it works ok if there is a fixed substring of all the file names that can be changed without disturbing the rest of the character string for each filename.

 

I do have to ask why you are switching from JPG to TIF. I used to use TIF files heavily in RM, but I am moving away from it. There are two reasons. First of all, the original reason that I used TIF so heavily was that TIF supports multiple images in one file very nicely. A typical use case for me was modern courthouse marriage records where there are three images for each marriage - a marriage application, a marriage license, and a marriage return. It was very convenient to package these three images into a single TIF file and to link that single TIF file into RM. But I gradually came to realize that many, many pieces of software only display the first of the three images and don't even give you any indication that the additional images are there. And I gradually begin publishing more of my data as Web pages, including images such as the courthouse marriage records. Web browsers do not support TIF files. So I have a long term project in progress to convert all my TIF files back to JPG files. If the TIF file only has one image, it becomes one JPG file. It the TIF file has multiple images, it becomes multiple JPG files. However, I am converting the TIF files to PNG instead of to JPG. The reason is that JPG files are lossy and each editing cycle of a JPG file causes it to lose resolution. PNG files are lossless. I'm aware of a thing called lossless JPG, but so far it seems to me that lossless JPG files are not very widely supported.

 

Jerry



#8 strathglass

strathglass

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 30 May 2020 - 11:22 AM

Media – Bulk Rename and Relink may illustrate ...

 

Thanks ... I will check that out and try to use! (Will advise eventually on the outcome.)



#9 strathglass

strathglass

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 30 May 2020 - 11:53 AM



zhangrau already provided the answer.

 

I do have to ask why you are switching from JPG to TIF.

 

My issue is that I have a lot of photos to clean up, so will need to do it piece-meal:

Zhangrau's solution for doing everything at once is very good, but won't apply to me working one subfolder at a time - leaving me only the manual option, which I want to avoid.

(I do have some manual work to do: numerous files also need name changes to match my new standard naming scheme...this is really why I am doing it one subfolder at a time.)

 

As for TIF format: I just find it is a superior format to PNG and JPG on numerous fronts (see here for an article on TIFF vs PNG).

[I don't use TIFF for multiple images: I assume you mean layers, which TIFF supports.]

I will convert these TIF files to JPG for web use.

 

Note in my case I am cleaning up to ease my workflow:

All my photos are mastered in my DAM/editing software - Capture One: I do all my photo edits and touch ups here, and also adding all IPTC meta data.

I have now structured the genealogy photo folders in my Capture One library to match the structure in RootsMagic.

So now I just need to export Capture One images to TIF using the same folder structure as the source, and this becomes my RootsMagic media folder!

So updates going forward will be very easy.

That's the theory at least! :)



#10 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3982 posts

Posted 30 May 2020 - 12:55 PM

 

[I don't use TIFF for multiple images: I assume you mean layers, which TIFF supports.]

 

I actually mean multiple images, although my terminology may be incorrect. When I think of layers, I think of the "Walt Disney making a cartoon movie" model. When I was a kid in the 50's, the Disney show on TV once upon a time showed how the Disney artists would paint the individual frames that became a movie on transparent sheets of something or other. A single frame would often have 5 or 6 sheets laid on top of each other before being photographed, with the characters like Mickey Mouse in the top sheet and various backgrounds - sky, mountains, trees, etc. - on sheets lower down the stack. For subsequent frames, the artists would have to draw a new foreground sheet but the background sheets could largely stay the same. My understanding of layers and graphics software is that graphics software simulates this Disney effect. For example, I have done so with GIMP. I'm not an expert with GIMP, but it seems to work in software exactly the same way that the Disney artists described for their movie making process back in the 50's. Really basic  graphics software like Paint, for example, doesn't usually support layers. And I do understand that there is software simulation of transparence/opacity in graphics files with layers, because I have used it.

So when I put three different images from a marriage record into a TIF file, they seem like three independent images that are not layered on top of each other. The tool I use to do so is the free software IrfanView. It "just works" to make what it calls a multipage TIF file. The IrfanView option is Options>Multipage Images>Create Multipage TIF ... In its normal viewing mode, IrfanView has right and left arrows to navigate forward and backward to all the files within a single folder. If a Multipage TIF file is encountered when scanning backwards and forwards through the images in a folder in this manner, Irfanview's toolbar enables up and down arrows that can be used to scan up and down the various pages within the single TIF file. But as I said, nearly all other graphics software I have used seems only to be able to see the first page within a Multipage TIF file as created by IrfanView.

 

Jerry



#11 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3982 posts

Posted 31 May 2020 - 08:49 AM

All my photos are mastered in my DAM/editing software - Capture One: I do all my photo edits and touch ups here, and also adding all IPTC meta data.

I have now structured the genealogy photo folders in my Capture One library to match the structure in RootsMagic.

So now I just need to export Capture One images to TIF using the same folder structure as the source, and this becomes my RootsMagic media folder!

 

You are not the only RM user who uses some sort of content management software to manage their image files. It's obviously a very powerful way to work, but so far I have not chosen to go that route. Even though I'm pretty high tech in general, I seem to go the low tech route for my image files. For example, I annotate my photos of things like people and places (e.g., the old farm house) by making a second copy of the photo, adding white space, and placing the text for the annotation in the added white space. My low tech tool for doing so is Microsoft Paint. It's like writing captions on the back of an old photograph except adding white space and adding the captions to the front. My "captions" just become a bunch of pixels and are not searchable or manageable. But my "captions" are not likely to get lost. I do try to include enough information in my multimedia file names to make them easily searchable and sortable and that sort of thing.

I have tried using GIMP instead of Microsoft Paint because GIMP supports layers and my added "caption" can be a text layer that is really text and not just a bunch of pixels. But using GIMP just seems to add unnecessary complication and time and effort to the process as compared to just using Paint.

 

For whatever reason, I have a great distrust for things like EXIF data and IPTC data. They seem to me to be hard to manage. With most software, they seem hard to see, hard to search, hard to print, and that sort of thing. And they seem very fragile. The data seems to be easily become lost when I copy or edit image files with simple tools. The EXIF data really isn't very meaningful anyway except in the context of original photographs made with a digital camera. EXIF data from a digital camera can be important, but any EXIF data from a scanner seems quite irrelevant. However, the IPTC data (captions, etc.) is not the sort of thing you want to be easily lost.

 

It's not IPTC data exactly, but RM is a guilty party that once upon a time lost a lot of captions for me. RM originally supported tagging media only from the item to which the media was tagged. For example, tags for people and events could only be created from the Edit Person screen. Tags for Sources and Citations could only be created from the Edit Citation screen, etc. Many of my captions were for family photos and my caption for  John Doe might say some like "John Doe, front row, second from left" and my caption for his older sister Jane Doe might say something like "Jane Doe, back row, third from right". In other words, the exact same photo could have a different caption depending upon the context in which it appeared. Then RM added the ability to tag from the Media Gallery and from Media Albums associated with individual items in RM such as a person. In the process of making this change, RM limited each photo to a single caption and I lost most of my captions in RM. Fool me once, shame on you. Fool me twice, shame on me. So I'm never going to trust RM again to be the keeper of my captions. And I'm not sure I really trust the IPTC data not to get lost by other means. And if I used Capture One to manage my photos and my captions, I'm not sure that I would really trust the data not to get lost when it is passed along to my children and grandchildren.

 

Despite my misgivings about IPTC data being the "permanent record" for captioning, it does make sense to me for RM to support it as a source for captions. It's too bad that it doesn't However (and if I understand the IPTC correctly), that would mean that each photo (including group photos) could only have one caption. When I "caption" my photos in my low tech way using Microsoft Paint, a group photo obviously only has one caption and the caption lists everybody in the photo. But a group photo is often the only photo I have of somebody. For example, a 1925 photo of my mother's family with 15 people in the photo is the only photo I have of her grandparents. So I have used Microsoft Paint to copy and paste them out of the original photo and into an image of their own, and this image has its own low tech "caption" added by Microsoft Paint.

 

Anybody who has read my posts through the years has probably picked up on fact that I have a background in math, science, and computer science. I basically did IT support for a living at colleges and universities, and I regularly taught a single math or computer science class on an adjunct basis although being a professor was never my official day job. As such, I worked extensively with libraries and librarians. In fact, at the last place I worked before retirement the library was a part of the IT department. I had numerous discussions about these kinds of issues through the years with the librarians, and they were universally in the "content management software" camp as the way to manage content. They would have loved your Capture One software. In fact, a library catalog is just a piece of content management software except that it is managing books instead of photos. But there is an institutional support there with a library. When a librarian retires, the library catalog is not going away. When the software managing the library catalog is replaced by a different piece of software, the library catalog will be converted to the new software and will not go away. But when I pass along my genealogical data to my kids and grandkids, I can't see the "institutional support" being there to preserve my work in any way other than low tech means.

 

Jerry



#12 strathglass

strathglass

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 01 June 2020 - 09:06 PM

 

You are not the only RM user who uses some sort of content management software to manage their image files.

BTW, I had not heard previously of multipage TIFF: not even Photoshop supports that to my knowledge, so I would avoid it...as you noted yourself, support is limited.

I shudder to think of someone using MS Paint to do any editing, but if it works for you...! I agree about Gimp: I find it a bit tedious, but it is powerful despite the UI shortcomings: I only use it when forced to (i.e. at work where I don't have access to PhotoShop or Capture One).

 

I totally trust IPTC: you add that right into the image file if you want (that is how I have Capture One setup). It is extremely widely used (i.e. the press uses this extensively of course!).

So in my Capture One library, I have added tons of text values to various IPTC fields across thousands of photos: if Capture One disappeared tomorrow, my image files still exist with all that IPTC data in them, so no problem...pretty much any software can read them.

Speaking of Imagemagick above: you can do a command line script with it to take an IPTC tag and convert one image into a new one with an added border containing the desired IPTC tag value.

 

When I have a photo with multiple people, like you - that may represent my only photo for several people in the photo:
What I do in Capture One is create variants for each different crop - a variant is a virtual copy that can have its own unique edits and metadata.

There is only one file/image name, so I use an IPTC field as the exported filename, that field will be set as required.

Example:

i-SkWBQj5-X5.png

 

Here is one file consisting of four variants: (1) is the original, which has a caption on it that someone had added (the way I received it), (2) is cropped to kill the added caption, (3) is cropped for the woman, and (4) is cropped for the man.

So Caption/Description can be different for each variant, which is what I want.



#13 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3982 posts

Posted 02 June 2020 - 06:54 AM

BTW, I had not heard previously of multipage TIFF: not even Photoshop supports that to my knowledge, so I would avoid it...as you noted yourself, support is limited.

 

I think originally I only discovered multipage TIFF files by accident and only because IrfanView supports them. At the time, I thought it was really nice to "containerize" three images from a single courthouse marriage record into a single Windows file. The three images were guaranteed to be kept together and I only had to link one Windows file into RM instead of linking three Windows files into RM.

 

However, I have encountered multipage TIFF's in one other context. As a part of my genealogy work. I do a lot of platting of old deeds onto relative modern maps. For the most part, I use USGS quadrangle topographic maps, at least for the first draft of the maps. USGS has stopped publishing updates to their maps on paper and they are switching to completely electronic means to distribute their maps. So far (and USGS acknowledges this), the electronic maps are missing many of the items that were available on the old printed maps. USGS is gradually adding what they call additional datasets to their electronic maps and eventually the electronic maps are supposed to be up to the standards of the old printed maps. In the meantime, you can download images of any of the old quadrangle printed maps for free - all the way back to the 1930's or 1940's. The downloaded files are multipage TIFF files.

 

The multipage TIFF files you download are a strange arrangement. Each page is an image of the same quadrangle map. But each page is at a different resolution. I think the idea is that you can extract the image with the resolution that suits your needs - higher resolution means more memory and vice versa. And these are huge images; so size matters. The printed maps are as big as something like the top of your kitchen table. So I suppose it makes sense to distribute the images at different resolutions. But unless you are using something like IrfanView, you are only aware of the first image in each TIFF file.

 

I do link my maps into RM, but RM does not seem to be a very appropriate repository for such images. I frequently feel like I struggle to understand what the mission of RM software really should be. Should it manage my maps? Should it manage my photographs? Should it manage my DNA data? Etc. I'm not sure RM or any of its competitors is always the best too for every single aspect of genealogy.

 

Jerry



#14 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6448 posts

Posted 02 June 2020 - 07:33 AM

Wikipedia: "TIFF readers must be prepared for multiple/multi-page images (subfiles) per TIFF file, although they are not required to actually do anything with images after the first one."

I was aware of its multipage capability from my engineering work thirty years ago.

Tom user of RM7630 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.