<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/fixtures/cmyk.jpg</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -223,6 +223,11 @@ module Fleximage
             @uploaded_image = Magick::Image.from_blob(file.read).first
           end
           
+          # Sanitize image data
+          @uploaded_image.colorspace  = Magick::RGBColorspace
+          @uploaded_image.density     = '72'
+          
+          # Save meta data to database
           set_magic_attributes(file)
           
           # Success, make sure everything is valid</diff>
      <filename>lib/fleximage/model.rb</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>test/.DS_Store</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,10 @@ class Test::Unit::TestCase #:nodoc:
     
     when :web_photo
       'http://www.google.com/intl/en_ALL/images/logo.gif'
-      
+    
+    when :cmyk
+      MockFile.new(&quot;#{RAILS_ROOT}/../fixtures/cmyk.jpg&quot;)
+    
     end
   end
   </diff>
      <filename>test/test_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,4 +19,13 @@ class FleximageFileUploadFromLocalTest &lt; Test::Unit::TestCase
     assert_equal 1, p.errors.size
     assert_equal 'was not a readable image', p.errors.on(:image_file)
   end
+  
+  def test_should_correct_colorspace_and_dpi
+    p = PhotoBare.new(:image_file =&gt; files(:cmyk))
+    image = p.load_image
+    assert_equal Magick::RGBColorspace, image.colorspace
+    assert_equal '72x72', image.density
+    assert_equal 300, image.columns
+    assert_equal 300, image.rows
+  end
 end</diff>
      <filename>test/unit/file_upload_from_local_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fe563024079feda6f0406f6917cf265dd7657201</id>
    </parent>
  </parents>
  <author>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </author>
  <url>http://github.com/Squeegy/fleximage/commit/6c6051daa04dc5b5eb419275bf33b7710c842bea</url>
  <id>6c6051daa04dc5b5eb419275bf33b7710c842bea</id>
  <committed-date>2008-06-02T14:27:26-07:00</committed-date>
  <authored-date>2008-06-02T14:27:26-07:00</authored-date>
  <message>Image file now has a little bit of sanitization when its uploaded.  It's converted to RGB and 72 dpi.

Thanks to Ezra Freedman!</message>
  <tree>f4c5ea5df59786f7f34d4178c632c4c13570d395</tree>
  <committer>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </committer>
</commit>
