Sha256: 4d7d2b7a7ed7059393f68d0c44c0022fc06e828a66e3155dcd9ee88504788185

Contents?: true

Size: 681 Bytes

Versions: 12

Compression:

Stored size: 681 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::DATADIR}/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

12 entries across 12 versions & 2 rubygems

Version Path
prawn-git-2.0.1 spec/jpg_spec.rb
prawn-2.0.1 spec/jpg_spec.rb
prawn-2.0.0 spec/jpg_spec.rb
prawn-1.3.0 spec/jpg_spec.rb
prawn-1.2.1 spec/jpg_spec.rb
prawn-1.1.0 spec/jpg_spec.rb
prawn-1.0.0 spec/jpg_spec.rb
prawn-0.15.0 spec/jpg_spec.rb
prawn-0.14.0 spec/jpg_spec.rb
prawn-0.13.2 spec/jpg_spec.rb
prawn-0.13.1 spec/jpg_spec.rb
prawn-0.13.0 spec/jpg_spec.rb