Latest recipes tagged "jpeg"http://code.activestate.com/recipes/tags/jpeg/new/2014-12-11T10:07:39-08:00ActiveState Code RecipesEXIF-date-based JPEG files rename using PIL (Python) 2012-07-21T02:38:33-07:00Jorge Barnabyhttp://code.activestate.com/recipes/users/4182918/http://code.activestate.com/recipes/578219-exif-date-based-jpeg-files-rename-using-pil/ <p style="color: grey"> Python recipe 578219 by <a href="/recipes/users/4182918/">Jorge Barnaby</a> (<a href="/recipes/tags/date/">date</a>, <a href="/recipes/tags/exif/">exif</a>, <a href="/recipes/tags/jfif/">jfif</a>, <a href="/recipes/tags/jpeg/">jpeg</a>, <a href="/recipes/tags/jpg/">jpg</a>, <a href="/recipes/tags/photo/">photo</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/rename/">rename</a>). Revision 2. </p> <p>Rename JPEG files according to EXIF-date using PIL [library].</p> <p>If global variable CREATE_HARDLINK is set, script creates Windows (XP) batch file for creating hardlink version of source files.</p> <p>PIL available here: <a href="http://www.pythonware.com/products/pil/" rel="nofollow">http://www.pythonware.com/products/pil/</a></p> mouse click to crop many large photos quickly [Python, PIL, pygame] (Python) 2012-01-09T03:18:01-08:00Elliot Hallmarkhttp://code.activestate.com/recipes/users/4180468/http://code.activestate.com/recipes/578005-mouse-click-to-crop-many-large-photos-quickly-pyth/ <p style="color: grey"> Python recipe 578005 by <a href="/recipes/users/4180468/">Elliot Hallmark</a> (<a href="/recipes/tags/crop/">crop</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/jpeg/">jpeg</a>, <a href="/recipes/tags/mouse/">mouse</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/png/">png</a>). </p> <p>Waste no mouse clicks making multiple crops on many image files. Through pygame interface with pan, zoom and next/previous image. Saves files at new resolution and serialized names in a seperate folder. the mainloop() and helper functions are easy to reuse, but I include a cruddy text based interface if needed. if not, comment out most of __main__().</p> <p>Requires PIL (python imaging library) and pygame.</p> jpg2pdf (Python) 2011-07-17T19:49:58-07:00Sundar Srinivasanhttp://code.activestate.com/recipes/users/4177884/http://code.activestate.com/recipes/577798-jpg2pdf/ <p style="color: grey"> Python recipe 577798 by <a href="/recipes/users/4177884/">Sundar Srinivasan</a> (<a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/jpeg/">jpeg</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/reportlab/">reportlab</a>). </p> <p>Program to convert JPEG to PDF. Technically it just embeds the JPEG in a landscape US letter size PDF page. When you might need it?: When you have to scan a document and do not have scanner handy, you can take a photograph of the document with webcam, and embed the JPEG into PDF - effectively works as a scanner.</p> EXIF-date-based JPEG files rename using PIL (Python) 2009-02-10T07:28:48-08:00Denis Barmenkovhttp://code.activestate.com/recipes/users/57155/http://code.activestate.com/recipes/576646-exif-date-based-jpeg-files-rename-using-pil/ <p style="color: grey"> Python recipe 576646 by <a href="/recipes/users/57155/">Denis Barmenkov</a> (<a href="/recipes/tags/date/">date</a>, <a href="/recipes/tags/exif/">exif</a>, <a href="/recipes/tags/jfif/">jfif</a>, <a href="/recipes/tags/jpeg/">jpeg</a>, <a href="/recipes/tags/jpg/">jpg</a>, <a href="/recipes/tags/photo/">photo</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/rename/">rename</a>). Revision 4. </p> <p>Rename JPEG files according to EXIF-date using PIL [library].</p> <p>If global variable CREATE_HARDLINK is set, script creates Windows (XP) batch file for creating hardlink version of source files.</p> <p>PIL available here: <a href="http://www.pythonware.com/products/pil/" rel="nofollow">http://www.pythonware.com/products/pil/</a></p> JPG files redater by EXIF data (Python) 2014-12-11T10:07:39-08:00Michal Niklashttp://code.activestate.com/recipes/users/186902/http://code.activestate.com/recipes/550811-jpg-files-redater-by-exif-data/ <p style="color: grey"> Python recipe 550811 by <a href="/recipes/users/186902/">Michal Niklas</a> (<a href="/recipes/tags/date/">date</a>, <a href="/recipes/tags/exif/">exif</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/jpeg/">jpeg</a>, <a href="/recipes/tags/jpg/">jpg</a>, <a href="/recipes/tags/pil/">pil</a>). Revision 6. </p> <p>Iterates through a directory, reading the EXIF data from each jpg/jpeg file. Parses the date/time from EXIF data and:</p> <ol> <li>if it differs from file modification date/time then changes file date/time</li> <li>moves file to <code>YYYY/YYYY_MM_DD</code> directory</li> </ol>