RepairTiffs

From UA Libraries Digital Services Planning and Documentation
Jump to: navigation, search

If bad tiffs are found in the archive (identified by FITS file saying it's not well formed or not valid), then follow these steps:

1) Copy the FITS file to /cifs-mount/Digital_Coll_temp/FIXME/Metadata/ , which is the same as S:\Digital Projects\Digital_Coll_temp\FIXME\Metadata\

NOTE: the script "findBad" in /srv/scripts/preservation will run (slowly, at night) through all the archive hunting tiffs that are bad, and putting the metadata for those into this directory. It will also add metadata to the database if it's not been entered for a good file. If there is no MIX, it will report that in an output file.

2) change directory to /srv/scripts/preservation and run copyTiffs -- this will locate up to 1000 archival tiffs from those which have FITS files in that directory, and copy them to S:\Digital Projects\Digital_Coll_temp\FIXME\Scans

3) On your desktop, open a command line prompt as administrator (Start -> All Programs -> Accessories -> and right click on command prompt, selecting "run as administrator".

4) Navigate to the location of the following scripts, which require both Irfanview, Perl64, and FITS to be installed on your computer. (Mine are located in C:\Perl64\scripts, and I moved the irfanview executable to that directory also (i_view32.exe). Check the paths in your copy of the scripts and make sure they reference the software correctly. For example, in fitsCheck, my path to the fits software is: $fitsScript = "C:\\FITS\\fits-0.8.0\\fits.bat";

5) Run File:IrfChange pl.txt . This will open each tiff in the above Scans directory and save it as a tiff in the ScansViaIrfanview directory.

6) When that is completed, run File:FitsCheck pl.txt . This will generate FITS files for the modified tiffs and check them. If they're good, they will move the good modified tiffs to the UploadMe directory, and will DELETE the original scans in the Scans directory. The FITS files are written to the MetadataRepaired directory, and if good, the older FITS file in the Metadata directory is also deleted.

7) Check the Metadata directory and ScansViaIrfanview directories to see if anything remains. If so, ask the Technical Lead to repair the images, as this process won't work for those.

8) Back on libcontent server, change directory to /srv/scripts/storing/problems and run modifiedTiffs with 2 parameters. The first is the path to the UploadMe directory, and the second is the path to the MetadataRepaired directory, for example:

modifiedTiffs   /cifs-mount/Digital_Coll_temp/FIXME/UploadMe/   /cifs-mount/Digital_Coll_temp/FIXME/MetadataRepaired/

Make sure you get that order correct, and have a forward slash at the end of the paths.

The script will ask you:

 Are these: 
  1)REPLACEMENTS with DIFFERENT CONTENT or 
  2)REPAIRED images with the SAME content?
 This is important.  We wipe out existing technical metadata if you choose #1.
 Please type 1 or 2 and hit enter

Be sure you make the correct choice.

This script will generate a MIX file for each FITS, add correct info to the md5sum database techMed and fileSums tables, collect checksum and size for the tiff, correct the checksum database and add to the modified table, and correct the checksum flat files, and then REPLACE the original tiff in the archive, and place the FITS and MIX files in the archive in the correct location.

Personal tools