<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pario TechnoBlob &#187; convert</title>
	<atom:link href="http://pario.no/tag/convert/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 26 Apr 2012 08:18:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Grab several screenshots from specified window in linux</title>
		<link>http://pario.no/2011/12/02/grab-several-screenshots-from-specified-window-in-linux/</link>
		<comments>http://pario.no/2011/12/02/grab-several-screenshots-from-specified-window-in-linux/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 07:23:01 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[windowid]]></category>
		<category><![CDATA[wxd]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1651</guid>
		<description><![CDATA[This was a short bash script I wrote to help document some startup problems on a server. The script was grabbing screen dumps from iDRAC during boot on a RHEL6 server, but it can be used on other distributions as well since the console command xwd is common. #!/bin/bash # Description: # Grab screenshot of [...]]]></description>
			<content:encoded><![CDATA[<p>This was a short bash script I wrote to help document some startup problems on a server.<br />
The script was grabbing screen dumps from iDRAC during boot on a RHEL6 server, but it can be used on other distributions as well since the console command xwd is common.</p>
<pre>
#!/bin/bash
# Description:
# Grab screenshot of a specified X-window and wait X-seconds

# Use xwininfo to find the Window id to the window you are going to
# grab screenshots from.
xwininfo="0x4c0001a"

# filename for output
outfile="outfile-"

# seconds sleep between grabs
sleeping=2

padding="000" # put as many padding zeros as you want on filename
for ((i=0; i<1000; i+=1))
do
        # Perform the actual screenshot grab
        xwd -id $xwininfo -out $outfile-${padding:${#i}}$i.xwd

        # Convert the xwd file to a better image format like PNG
        convert $outfile-${padding:${#i}}$i.xwd $outfile-${padding:${#i}}$i.png

        # Delete the converted XWD-file
        rm -f $outfile-${padding:${#i}}$i.xwd

        # wait
        sleep $sleeping
done</pre>
<p>Stop the script after you have grabbed enough screenshots.</p>
<p>I ended up with several files named outfile-000.png outfile-001.png ...<br />
Deleted those files that were not needed and sent the images a documentation of the booting process.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTEvMTIvMDIvZ3JhYi1zZXZlcmFsLXNjcmVlbnNob3RzLWZyb20tc3BlY2lmaWVkLXdpbmRvdy1pbi1saW51eC88d3B0Yj5HcmFiIHNldmVyYWwgc2NyZWVuc2hvdHMgZnJvbSBzcGVjaWZpZWQgd2luZG93IGluIGxpbnV4PHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2011/12/02/grab-several-screenshots-from-specified-window-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracting images from Adobe Acrobat PDF file</title>
		<link>http://pario.no/2008/02/02/extracting-images-from-adobe-acrobat-pdf-file/</link>
		<comments>http://pario.no/2008/02/02/extracting-images-from-adobe-acrobat-pdf-file/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 22:38:16 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://pario.no/2008/02/02/extracting-images-from-adobe-acrobat-pdf-file/</guid>
		<description><![CDATA[This is a short example of how to extract images from a PDF file using ImageMagick # convert thePDFfile.pdf page-%03d.png # ls page* page-000.png page-001.png page-002.png Imagemagick can also be used to create Adobe Acrobat PDF documents convert DSC* resultFile.pdf The resultfile contains one image per page.]]></description>
			<content:encoded><![CDATA[<p>This is a short example of how to extract images from a PDF file using ImageMagick</p>
<pre>
# convert thePDFfile.pdf page-%03d.png
# ls page*
page-000.png  page-001.png  page-002.png</pre>
<p>Imagemagick can also be used to create Adobe Acrobat PDF documents</p>
<pre>
convert DSC* resultFile.pdf</pre>
<p>The resultfile contains one image per page.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDIvMDIvZXh0cmFjdGluZy1pbWFnZXMtZnJvbS1hZG9iZS1hY3JvYmF0LXBkZi1maWxlLzx3cHRiPkV4dHJhY3RpbmcgaW1hZ2VzIGZyb20gQWRvYmUgQWNyb2JhdCBQREYgZmlsZTx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/02/02/extracting-images-from-adobe-acrobat-pdf-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resize and watermark images using Imagemagick</title>
		<link>http://pario.no/2007/12/30/resize-and-watermark-images-using-imagemagick/</link>
		<comments>http://pario.no/2007/12/30/resize-and-watermark-images-using-imagemagick/#comments</comments>
		<pubDate>Sun, 30 Dec 2007 16:33:31 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Photo etc]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[jhead]]></category>

		<guid isPermaLink="false">http://pario.no/2007/12/30/373/</guid>
		<description><![CDATA[This is a modified version of my Resize of images in a folder with imagemagick post back in February. Only difference this time is that i strips out EXIF tags and the script has been cleaned up a bit. Click on the image to see the result in full size. #!/bin/bash # Description: # Script [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pario.no/wp-content/uploads/2008/01/dsc_9645_cropped_resized_320.JPG" title="Tina resized"><img src="http://pario.no/wp-content/uploads/2008/01/dsc_9645_cropped_resized_320.thumbnail.JPG" alt="Tina resized" /></a>This is a modified version of my <a href="http://pario.no/2007/02/02/resize-of-images-in-folder-with-imagemagick/">Resize of images in a folder with imagemagick</a> post back in February. Only difference this time is that i strips out EXIF tags and the script has been cleaned up a bit. Click on the image to see the result in full size.</p>
<pre>
#!/bin/bash

# Description:
# Script to resize JPG images to desired width defined in IMAGESIZE variable.
# EXIF tags is also removed from the result images.
# Software needed:
# jhead - http://www.sentex.net/~mwandel/jhead/
# imagemagick - http://www.imagemagick.org

IMAGESIZE="320 480"
for IMAGEFILE in $(ls|grep JPG)
do
        for I in $IMAGESIZE
        do
                # create directories if needed
                if [ ! -d $I ]
                then
                        mkdir $I
                fi

                # Strip EXIF tag information from source file
                jhead -purejpg $IMAGEFILE

                # Resize file
                base=`basename $IMAGEFILE .JPG`_Resized_$I.JPG
                convert $IMAGEFILE -resize $I $base

                # Watermark the file
                width=`identify -format %w $base`
                convert -background '#0008' -fill white -gravity center -size ${width}x15 \
                -font Verdana -pointsize 10 \
                caption:"Copyright © 2007 Pario.no" \
                +size $base +swap -gravity south -composite $I/$base;

                # delete resized file
                rm $base
        done

        # Delete source file (DO NOT USE YOUR ORIGINAL FILE!)
        rm $IMAGEFILE
done</pre>
<p>You can <a href="http://pario.no/wp-content/uploads/2007/12/resize.sh" title="resize.sh">download my resize, watermark bash script here.</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTIvMzAvcmVzaXplLWFuZC13YXRlcm1hcmstaW1hZ2VzLXVzaW5nLWltYWdlbWFnaWNrLzx3cHRiPlJlc2l6ZSBhbmQgd2F0ZXJtYXJrIGltYWdlcyB1c2luZyBJbWFnZW1hZ2ljazx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/12/30/resize-and-watermark-images-using-imagemagick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adjust images to a digital frame (480&#215;234 pixels)</title>
		<link>http://pario.no/2007/11/25/adjust-images-to-a-digital-frame-480x234-pixels/</link>
		<comments>http://pario.no/2007/11/25/adjust-images-to-a-digital-frame-480x234-pixels/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 12:03:38 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Photo etc]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[montage]]></category>
		<category><![CDATA[od]]></category>

		<guid isPermaLink="false">http://pario.no/2007/11/25/adjust-images-to-a-digital-frame-480x234-pixels/</guid>
		<description><![CDATA[This bash script adjusts images to fit in a digital frame with a resolution of 480&#215;234 pixels however by using the size 832&#215;468 pictures are displayed sharper on some frames. Normally, narrower pictures will have black borders at both sides when displayed. but this script makes the border color the average of the picture. The [...]]]></description>
			<content:encoded><![CDATA[<p>This bash script adjusts images to fit in a digital frame with a resolution of 480&#215;234 pixels however by using the size 832&#215;468 pictures are displayed sharper on some frames.  Normally, narrower pictures will have black borders at both sides when displayed. but this script makes the border color the average of the picture.</p>
<p>The following linux tools are used in the script: convert and montage, bash, od and awk. od is part of the textutils package in Debian.</p>
<pre>
#!/bin/bash
# current directory contains source JPG files
# $DESTINATION is where the prepared JPG files are stored
# $TEMP is a temporary directory
TEMP=TEMP
DESTINATION=DESTINATION
GEO=832x468 # geometry of target JPG files and resize value

for FILE in *.JPG
do
convert -resize 1x1 "$FILE" "$TEMP/1x1.bmp"
od -A n -j 54 -t u1 "$TEMP/1x1.bmp" | awk -v f="$FILE" -v des="$DESTINATION/" -v geo="$GEO" '
{
print "montage -geometry", geo, "-resize", geo, "-background rgb\\(" $3 \
"," $2 "," $1 "\\) \"" f "\" \"" des f "\"";
exit;
}'

done | sh -x</pre>
<p>Source: <a href="http://groups.google.com/group/comp.graphics.misc/browse_thread/thread/312e98382b9b4102">comp.graphics.misc</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/groups.google.com\/group\/comp.graphics.misc\/browse_thread\/thread\/312e98382b9b4102"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTEvMjUvYWRqdXN0LWltYWdlcy10by1hLWRpZ2l0YWwtZnJhbWUtNDgweDIzNC1waXhlbHMvPHdwdGI%2BQWRqdXN0IGltYWdlcyB0byBhIGRpZ2l0YWwgZnJhbWUgKDQ4MCYjMjE1OzIzNCBwaXhlbHMpPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/11/25/adjust-images-to-a-digital-frame-480x234-pixels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great collection of advanced Imagemagick scripts</title>
		<link>http://pario.no/2007/11/25/great-collection-of-advanced-imagemagick-scripts/</link>
		<comments>http://pario.no/2007/11/25/great-collection-of-advanced-imagemagick-scripts/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 11:29:34 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Photo etc]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[imagemagick]]></category>

		<guid isPermaLink="false">http://pario.no/2007/11/25/great-collection-of-advanced-imagemagick-scripts/</guid>
		<description><![CDATA[Today I stumbled upon Fred&#8217;s Imagemagick Scripts, a nice collection of bash scripts to do image manipulations like 3D rotate change/enhance brightness Superimposes a set of horizontal and/or vertical grid lines on an image etc&#8230;]]></description>
			<content:encoded><![CDATA[<p>Today I stumbled upon <a href="http://www.fmwconcepts.com/imagemagick/index.php">Fred&#8217;s Imagemagick Scripts</a>, a nice collection of bash scripts to do image manipulations like</p>
<ul>
<li>3D rotate</li>
<li>change/enhance brightness</li>
<li>Superimposes a set of horizontal and/or vertical grid lines on an image</li>
<li>etc&#8230;
<ol></ol>
</li>
</ul>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/www.fmwconcepts.com\/imagemagick\/index.php"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTEvMjUvZ3JlYXQtY29sbGVjdGlvbi1vZi1hZHZhbmNlZC1pbWFnZW1hZ2ljay1zY3JpcHRzLzx3cHRiPkdyZWF0IGNvbGxlY3Rpb24gb2YgYWR2YW5jZWQgSW1hZ2VtYWdpY2sgc2NyaXB0czx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/11/25/great-collection-of-advanced-imagemagick-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

