Skip to content

Commit

Permalink
Another big image export speed boost by switching to oily_png
Browse files Browse the repository at this point in the history
  • Loading branch information
meltingice committed Aug 7, 2013
1 parent 14aaf01 commit e77c202
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/psd/image_exports/png.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'chunky_png'
require 'oily_png'

class PSD::Image
module Export
Expand All @@ -8,7 +8,7 @@ module PNG
# data.
def to_png
PSD.logger.debug "Beginning PNG export"
png = ChunkyPNG::Image.new(width, height, ChunkyPNG::Color::TRANSPARENT)
png = ChunkyPNG::Image.new(width.to_i, height.to_i, ChunkyPNG::Color::TRANSPARENT)

i = 0
height.times do |y|
Expand Down
2 changes: 1 addition & 1 deletion psd.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]

gem.add_dependency "bindata"
gem.add_dependency "chunky_png"
gem.add_dependency "oily_png"
gem.add_dependency 'psd-enginedata'

gem.test_files = Dir.glob("spec/**/*")
Expand Down

0 comments on commit e77c202

Please sign in to comment.