Jump to content


Photo

Quick Fix to Saving Media the Wrong Way?


  • Please log in to reply
12 replies to this topic

#1 FamilyHistoryFreak

FamilyHistoryFreak

    Member

  • Members
  • PipPip
  • 10 posts

Posted 12 May 2011 - 09:54 PM

While adding media (hundreds), I mistakenly added images under the "file" menu instead of the "image" option. Because I did this, I can't see thumbnails, nor do the media show up in my scrapbook. Do I have to manually go back through & add all these media again under the "image" option (which is time-consuming because I have to go through all the file paths each time), or is there a quicker way to convert all those media to be images instead of files? Please tell me there's an easier way because I literally have already added hundreds of media & the thought of having to go back & do that all over again...

#2 kbens0n

kbens0n

    Advanced Member

  • Members
  • PipPipPip
  • 3458 posts

Posted 13 May 2011 - 12:31 AM

While adding media (hundreds), I mistakenly added images under the "file" menu instead of the "image" option. Because I did this, I can't see thumbnails, nor do the media show up in my scrapbook. Do I have to manually go back through & add all these media again under the "image" option (which is time-consuming because I have to go through all the file paths each time),

I believe you would not only need to go back and add them all as the "image" option, but you would want to also delete all those others that were added using the "file" option.

or is there a quicker way to convert all those media to be images instead of files? Please tell me there's an easier way because I literally have already added hundreds of media & the thought of having to go back & do that all over again...

You could export a GEDCOM of your entire database and then edit all those to be of type image (problems would arise if you have some that are actually not graphic files, though) by replacing as follows:

All instances of:

_TYPE DOCUMENT

with:

_TYPE PHOTO

then save the GEDCOM again as a plain text file with a name.GED extension and import the modified GEDCOM into a fresh new database. Voila!

---
--- "GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own." - Ambrose Bierce
--- "The trouble ain't what people don't know, it's what they know that ain't so." - Josh Billings
---Ô¿Ô---
K e V i N


#3 TreeTraverser

TreeTraverser

    Advanced Member

  • Members
  • PipPipPip
  • 48 posts

Posted 13 May 2011 - 08:11 AM

A related problem to keep in mind: When I added media, I always chose "Add new media" even if I had already added that particular media item to another person or fact. I didn't realize it at the time, but I should have chosen "Add from gallery." Now when I choose "List | Media Gallery" I see several duplicate copies of the same item. It apparently causes no harm, but it does make it more difficult to manage my collection. It's too bad there isn't a confirmation message displayed when you try to add a new media item and that item is already in the media gallery.

#4 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6254 posts

Posted 13 May 2011 - 08:44 AM

An SQLite query outside RootsMagic on your .rmgc database appears to be a quick fix:

UPDATE MultimediaTable SET MediaType=1 WHERE MediaFile LIKE '%.jpg';

assuming your image files have the .jpg extension.

Then open the Media Gallery and I think it will automatically refresh thumbnails.


See the link in my signature for guidance on SQLite with RootsMagic.

Tom user of RM7550 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 FamilyHistoryFreak

FamilyHistoryFreak

    Member

  • Members
  • PipPip
  • 10 posts

Posted 13 May 2011 - 11:53 AM

I actually do have all kinds of files saved as media - jpg, .doc, pdf, & .wps - so your suggestion wouldn't work, then?


I believe you would not only need to go back and add them all as the "image" option, but you would want to also delete all those others that were added using the "file" option.

You could export a GEDCOM of your entire database and then edit all those to be of type image (problems would arise if you have some that are actually not graphic files, though) by replacing as follows:

All instances of:

_TYPE DOCUMENT

with:

_TYPE PHOTO

then save the GEDCOM again as a plain text file with a name.GED extension and import the modified GEDCOM into a fresh new database. Voila!



#6 FamilyHistoryFreak

FamilyHistoryFreak

    Member

  • Members
  • PipPip
  • 10 posts

Posted 13 May 2011 - 11:57 AM

Yes, I've had to do some of that erasing, too, unfortunately. My media gallery is so junked up & hard to find things in, I don't ever use it. I'm learning the hard way how to use this program...

A related problem to keep in mind: When I added media, I always chose "Add new media" even if I had already added that particular media item to another person or fact. I didn't realize it at the time, but I should have chosen "Add from gallery." Now when I choose "List | Media Gallery" I see several duplicate copies of the same item. It apparently causes no harm, but it does make it more difficult to manage my collection. It's too bad there isn't a confirmation message displayed when you try to add a new media item and that item is already in the media gallery.



#7 FamilyHistoryFreak

FamilyHistoryFreak

    Member

  • Members
  • PipPip
  • 10 posts

Posted 13 May 2011 - 12:00 PM

I have absolutely no idea what any of this means!! I'm basically an intermediate computer user - I can do the basics without any trouble, but if it gets too technical, I'm lost...If you can dumb this down for me, maybe I can try it :)


An SQLite query outside RootsMagic on your .rmgc database appears to be a quick fix:

UPDATE MultimediaTable SET MediaType=1 WHERE MediaFile LIKE '%.jpg';

assuming your image files have the .jpg extension.

Then open the Media Gallery and I think it will automatically refresh thumbnails.


See the link in my signature for guidance on SQLite with RootsMagic.



#8 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6254 posts

Posted 13 May 2011 - 02:33 PM

I have absolutely no idea what any of this means!! I'm basically an intermediate computer user - I can do the basics without any trouble, but if it gets too technical, I'm lost...If you can dumb this down for me, maybe I can try it :)

It is pretty easy even though it seems daunting when you have no idea what you are doing! Go to the SQLiteToolsForRootsMagic4 wiki if you have not already and browse How to Query RootsMagic 4. Then download and install the free SQLiteSpy program for Windows. Using RootsMagic, make a backup of your database before any SQLite operation that is intended to modify your database. Run SQLiteSpy and use its File > Open database to open your database .rmgc file. The cursor will be blinking in the upper right empty pane of the SQLiteSpy window - that is where you will enter your SQL query. Copy the SQL command line (query) from my prior message (c/w semi-colon) into this space. With SQLiteSpy as the active window, press the F9 key to execute the query. You can close SQLiteSpy and proceed to open the Media Gallery in RootsMagic. Done!

Tom user of RM7550 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.


#9 kbens0n

kbens0n

    Advanced Member

  • Members
  • PipPipPip
  • 3458 posts

Posted 13 May 2011 - 03:04 PM

I actually do have all kinds of files saved as media - jpg, .doc, pdf, & .wps - so your suggestion wouldn't work, then?

THAT suggestion wouldn't ...but this would (but you'll need a text editor that can replace in multi-line fashion):

Replace (where <SPACE> represents a blank space and <RETURN> represents a carriage return):

2<SPACE>FORM<SPACE>jpg<RETURN>
2<SPACE>_TYPE<SPACE>DOCUMENT

with:

2<SPACE>FORM<SPACE>jpg<RETURN>
2<SPACE>_TYPE<SPACE>PHOTO

and replace:

2<SPACE>FORM<SPACE>gif<RETURN>
2<SPACE>_TYPE<SPACE>DOCUMENT

with:

2<SPACE>FORM<SPACE>gif<RETURN>
2<SPACE>_TYPE<SPACE>PHOTO

and replace:

2<SPACE>FORM<SPACE>tif<RETURN>
2<SPACE>_TYPE<SPACE>DOCUMENT

with:

2<SPACE>FORM<SPACE>tif<RETURN>
2<SPACE>_TYPE<SPACE>PHOTO

and replace:

2<SPACE>FORM<SPACE>bmp<RETURN>
2<SPACE>_TYPE<SPACE>DOCUMENT

with:

2<SPACE>FORM<SPACE>bmp<RETURN>
2<SPACE>_TYPE<SPACE>PHOTO


etc. for any other photo file extension types that you may be using.

---
--- "GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own." - Ambrose Bierce
--- "The trouble ain't what people don't know, it's what they know that ain't so." - Josh Billings
---Ô¿Ô---
K e V i N


#10 FamilyHistoryFreak

FamilyHistoryFreak

    Member

  • Members
  • PipPip
  • 10 posts

Posted 13 May 2011 - 08:44 PM

I followed your directions, but when I try to open my backup, it says that it isn't a database or that it's encrypted & needs a password?!?!


It is pretty easy even though it seems daunting when you have no idea what you are doing! Go to the SQLiteToolsForRootsMagic4 wiki if you have not already and browse How to Query RootsMagic 4. Then download and install the free SQLiteSpy program for Windows. Using RootsMagic, make a backup of your database before any SQLite operation that is intended to modify your database. Run SQLiteSpy and use its File > Open database to open your database .rmgc file. The cursor will be blinking in the upper right empty pane of the SQLiteSpy window - that is where you will enter your SQL query. Copy the SQL command line (query) from my prior message (c/w semi-colon) into this space. With SQLiteSpy as the active window, press the F9 key to execute the query. You can close SQLiteSpy and proceed to open the Media Gallery in RootsMagic. Done!



#11 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6254 posts

Posted 13 May 2011 - 11:12 PM

Open the .rmgc file, not the .rmgb backup file.

Tom user of RM7550 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.


#12 FamilyHistoryFreak

FamilyHistoryFreak

    Member

  • Members
  • PipPip
  • 10 posts

Posted 14 May 2011 - 12:10 PM

I don't understand how all that works - but THANK YOU SO VERY MUCH!!!! It didn't work on the media links that were broken due to me changing the file path, but I'm assuming that after I go in & get the links fixed & run that SQ thing again that it will fix those as well? Absolutely amazing - you saved me days of monotonous fixing - thanks again!!

Open the .rmgc file, not the .rmgb backup file.



#13 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6254 posts

Posted 14 May 2011 - 12:48 PM

You`re welcome! Once you fix the broken links to the photos, you are finished. The query has already changed the stored type from file to photo and need not be run again.

Tom user of RM7550 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.