Sha256: 9cd30b52ce221017a3591945c61ea468a3842d2f0975ebe44ab9ef60971e8a9a

Contents?: true

Size: 695 Bytes

Versions: 39

Compression:

Stored size: 695 Bytes

Contents

# encoding: utf-8

# Spec'ing the PNG class. Not complete yet - still needs to check the
# contents of palette and transparency to ensure they're correct.
# Need to find files that have these sections first.

require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")  

describe "When reading a JPEG file" do

  before(:each) do
    @filename = "#{Prawn::BASEDIR}/data/images/pigs.jpg"
    @img_data = File.open(@filename, "rb") { |f| f.read }
  end
   
  it "should read the basic attributes correctly" do
    jpg = Prawn::Images::JPG.new(@img_data)
    
    jpg.width.should == 604
    jpg.height.should == 453
    jpg.bits.should == 8
    jpg.channels.should == 3
  end
end

Version data entries

39 entries across 39 versions & 12 rubygems

Version Path
fullcirclegroup-fullcirclegroup-prawn-0.2.99.2 spec/jpg_spec.rb
fullcirclegroup-prawn-0.2.99.3 spec/jpg_spec.rb
kavu-prawn-core-0.4.100 spec/jpg_spec.rb
kavu-prawn-core-0.4.99 spec/jpg_spec.rb
satoko-prawn-0.2.99.6 spec/jpg_spec.rb
prawn-1.0.0.rc1 spec/jpg_spec.rb
prawn-0.12.0 spec/jpg_spec.rb
prawn-0.11.1 spec/jpg_spec.rb
davebenvenuti-prawn-0.11.1.pre spec/jpg_spec.rb
piglop-prawn-0.10.2.3 spec/jpg_spec.rb
piglop-prawn-0.10.2.2 spec/jpg_spec.rb
piglop-prawn-0.10.2.1 spec/jpg_spec.rb
prawn-0.11.1.pre spec/jpg_spec.rb
goodwill-prawn-edge-0.10.0 spec/jpg_spec.rb
alphasights-prawn-0.10.4 spec/jpg_spec.rb
alphasights-prawn-0.10.3 spec/jpg_spec.rb
alphasights-prawn-0.10.2 spec/jpg_spec.rb
alphasights-prawn-0.10.1 spec/jpg_spec.rb
alphasights-prawn-0.10.0 spec/jpg_spec.rb
prawn-core-0.8.4 spec/jpg_spec.rb