![]() This produced a low-resolution image that appeared out of focus. Apparently the client's report software that worked fine with my LR-5.7 jpgs was ignoring the full uploaded resolution from LR-CC jpgs, and instead magnifying the embedded thumbnail. When I switched from LR-5.7 to LR-CC, my jpgs began showing up very blurry after being uploaded into my client's reporting software. I'm the user who had the problem John R Ellis is reporting on May 13, 2015. Windows 8.1: File Explorer Preview, Irfanview, Paint, Windows Photo ViewerĮven though LR's JPEGs may be strictly conforming, if it wrote the JPEGs without the unused header bytes and it put IFD0 immediately after the TIFF header, as Photoshop does, then there would be fewer problems with other programs choking on LR's JPEGs. Mac: Preview, Photoshop CC 2014, ColorSync Utility, Firefox, Chrome, Lattice, Paintbrush, Safari, Word I've tested LR JPEGs with 12 Mac and Windows programs and 2 online services, all of which read them just fine: Here's an Exiftool dump of the beginning of a LR JPEG:Īnd here's a dump of the beginning of a Photoshop JPEG: Whereas Photoshop CC uses a more traditional layout: TIFF header, no unused bytes, IFD0, ExifIFD, IFD1. LR writes the APP1 header as: TIFF header, 114 unused bytes, ExifIFD, IFD1, IFD0. While they appear to be strictly conforming to industry standards, the unusual layout has caused problems for at least two users: one who had problems uploading photos to real-estate services, and another whose own software tripped over the layout. On Linux I have run this with 600 files, and it took 11.Lightroom CC writes JPEGs in an atypical layout that trips up other programs. Windoze may have a problem with long lists of files, so you my need to do it using an argfile. 'STDOUT:' + () if isinstance(res.stdout, bytes) else res.stdout) Res = n(batchup, capture_output=True)Įrrdata=('STDERR:\n' + () if isinstance(res.stderr, bytes) else res.stderr + exiftool will handle any number of files at a time, so to process a bunch of files, and extract specific metadata fields, this goes about 8 times faster on my laptop: def meta_for_batch(fieldlist, filelist):īatchup = + fieldlist + filelist This still turns up in searches, but using stay open etc, is barely faster than just running up subprocess individually for each file. directory find and execute on every document found. Print(json.dumps(tadata_lookup, indent=3)) tadata_lookup = self.get_metadata(FileLoc) ![]() Return json.loads(self.execute("-G", "-j", "-n", *FileLoc))įor dirname, dirnames, filenames in os.walk(locDir): > 30 (str.join("\n", args))ĪttributeError: 'ExifTool' object has no attribute 'process' ![]() return follow ERROR using Python 3.8.10 and IPYTHON Otherwise the program will hang because the while loop inside execute() won't stop The second is that you have to decode the byte series returned by os.read(): output += os.read(fd, 4096).decode('utf-8')ĮDIT for Windows: To get this working on Windows, the sentinel need to be changed into "\r\n" The first is an additional argument to subprocess.Popen: self.process = subprocess.Popen( To get this to work in python 3 two small changes are needed. ![]() This class is written as a context manager to ensure the process is exited if you are done. Return json.loads(self.execute("-G", "-j", "-n", *filenames)) Stdin=subprocess.PIPE, stdout=subprocess.PIPE)ĭef _exit_(self, exc_type, exc_value, traceback): ![]() I also included get_metadata() to read the metadata in JSON format: import subprocessĭef _init_(self, executable="/usr/bin/exiftool"): Here's a simple class that launches an exiftool process and features an execute() method to send commands to that process. ExifTool supports JSON output, which is probably the best option for reading the metadata. You can then send commands to the process via stdin, and read the output on stdout. To avoid launching a new process for each image, you should start exiftool using the -stay_open flag. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |