<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Knowledge Base (Posts about jpg)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/jpg.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2024 &lt;a href="mailto:bgstack15@gmail.com"&gt;bgstack15&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
style="border-width:0; margin-bottom:12px;"
src="https://bgstack15.ddns.net/.images/l_by-sa_4.0_88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Wed, 18 Dec 2024 14:00:37 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Convert pdf to jpg</title><link>https://bgstack15.ddns.net/blog/posts/2024/12/18/convert-pdf-to-jpg/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;Quick and dirty, but way better than &lt;code&gt;convert input.pdf output.jpg&lt;/code&gt;. I'm assuming there was a resolution setting somewhere for "convert" that I never bothered to research.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;pdftoppm -jpeg -r 300 input.pdf output
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Specifically omit the extension, because you will get files like &lt;code&gt;output-1.jpg&lt;/code&gt;, &lt;code&gt;output-2.jpg&lt;/code&gt;, et al.: one for each page.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Ripped shamelessly from:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/stackoverflow.com/questions/43085889/how-to-convert-a-pdf-into-jpg-with-command-line-in-linux/61700520#61700520"&gt;How to convert a PDF into JPG with command line in Linux? - Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>convert</category><category>jpg</category><category>pdf</category><guid>https://bgstack15.ddns.net/blog/posts/2024/12/18/convert-pdf-to-jpg/</guid><pubDate>Wed, 18 Dec 2024 13:58:00 GMT</pubDate></item><item><title>Convert .dng to .jpg</title><link>https://bgstack15.ddns.net/blog/posts/2022/06/18/convert-dng-to-jpg/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;I had a batch of .dng files that should be converted to .jpg format. I tried a few ways, but they did not preserve all the exif metadata. My process documented below does.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Use Irfanview to batch convert all .dng files to .jpg. This will strip a lot of the metadata.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add in metadata from original file.&lt;/p&gt;
&lt;p&gt;time for word in *dng ; do exiftool -all= -tagsfromfile "${word}" -exif:all "${word%%.dng}.jpg" ; done&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This command syntax is verbatim from the man page for exiftool.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Apply original timestamp.&lt;/p&gt;
&lt;p&gt;for word in *dng ; do touch --no-create --reference "${word}" "${word%%dng}jpg" ; done&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optionall, remove the original files.&lt;/p&gt;
&lt;p&gt;rm $( for word in *.jpg ; do echo "${word%%.jpg}.dng" ; done ; )&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;h3&gt;Man pages&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;exiftool(1p)&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>convert</category><category>irfanview</category><category>jpg</category><guid>https://bgstack15.ddns.net/blog/posts/2022/06/18/convert-dng-to-jpg/</guid><pubDate>Sat, 18 Jun 2022 13:04:03 GMT</pubDate></item></channel></rss>