<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,7 +13,7 @@ module PDF
     # &lt;tt&gt;:proportional&lt;/tt&gt;::   Boolean. Maintain image proportions when scaling. Defaults to false.
     # &lt;tt&gt;:padding&lt;/tt&gt;::    Add some padding between the image and the specified box.
     # &lt;tt&gt;:center&lt;/tt&gt;::    If the image is scaled, it will be centered horizontally and vertically
-    # &lt;tt&gt;:rotate&lt;/tt&gt;::    The desired rotation.One of :counterclockwise, :upsidedown, :clockwise.
+    # &lt;tt&gt;:rotate&lt;/tt&gt;::    The desired rotation. One of :counterclockwise, :upsidedown, :clockwise.
     #                       Doesn't work with PNG, PDF or SVG files.
     #
     # left and top default to the current cursor location
@@ -36,7 +36,7 @@ module PDF
       when :png   then draw_png filename, opts
       when :svg   then draw_svg filename, opts
       else
-        draw_pixbuf filename, opts.merge( :rotate =&gt; ( opts[:rotate] || :none ) )
+        draw_pixbuf filename, opts
       end
     end
 
@@ -134,7 +134,9 @@ module PDF
       load_libpixbuf
       x, y = current_point
       pixbuf = Gdk::Pixbuf.new(filename)
-      pixbuf = pixbuf.rotate( rotation_constant( opts[:rotate] ) )
+      if opts[:rotate]
+        pixbuf = pixbuf.rotate( rotation_constant( opts[:rotate] ) )
+      end
       width, height = calc_image_dimensions(opts[:width], opts[:height], pixbuf.width, pixbuf.height, opts[:proportional])
       x, y = calc_image_coords(opts[:left] || x, opts[:top] || y, opts[:width] || pixbuf.width, opts[:height] || pixbuf.height, width, height,  opts[:center])
       @context.save do</diff>
      <filename>lib/pdf/wrapper/images.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,5 +29,13 @@ context &quot;The PDF::Wrapper class&quot; do
     pdf.calc_image_dimensions(300, 250, 200, 200, true).should eql([250.0,250.0])
   end
 
+  specify &quot;should be able to draw rotated images correctly&quot; do
+    pdf = PDF::Wrapper.new
+    pdf.image(File.dirname(__FILE__) + &quot;/data/shipsail.jpg&quot;, :rotate =&gt; :clockwise)
+    pdf.image(File.dirname(__FILE__) + &quot;/data/shipsail.jpg&quot;, :rotate =&gt; :counterclockwise)
+    pdf.image(File.dirname(__FILE__) + &quot;/data/shipsail.jpg&quot;, :rotate =&gt; :upsidedown)
+    pdf.image(File.dirname(__FILE__) + &quot;/data/shipsail.jpg&quot;, :rotate =&gt; :none)
+  end
+
   specify &quot;should be able to draw an image with padding correctly&quot;
 end</diff>
      <filename>specs/image_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>72c9be536fd52fceb7169f9369f27cf220eed10f</id>
    </parent>
  </parents>
  <author>
    <name>James Healy</name>
    <email>jimmy@deefa.com</email>
  </author>
  <url>http://github.com/yob/pdf-wrapper/commit/4f4256b246b5a3028286a48f1dd14bd04c02000a</url>
  <id>4f4256b246b5a3028286a48f1dd14bd04c02000a</id>
  <committed-date>2008-07-28T00:54:46-07:00</committed-date>
  <authored-date>2008-07-28T00:54:11-07:00</authored-date>
  <message>tighten image rotation code a little</message>
  <tree>5ee1718db9f38bd90ebf08e875fbe92b9dfcda5c</tree>
  <committer>
    <name>James Healy</name>
    <email>jimmy@deefa.com</email>
  </committer>
</commit>
