Sha256: 3d6896252a98fb6e8b577f9563869f5374b4cd412106de109036b961b7930238

Contents?: true

Size: 513 Bytes

Versions: 4

Compression:

Stored size: 513 Bytes

Contents

class Knj::RSVGBIN
	def self.test_version
		test_version = %x[rsvg-convert -v]
		if !test_version.match(/^rsvg-convert version [0-9\.]+$/)
			raise "No valid version of rsvg-bin was found."
		end
	end
	
	def self.png_content_from_file(file_from)
		RSVGBIN.test_version
		return %x[rsvg-convert #{Strings.unixsafe(file_from)}]
	end
	
	def self.convert_file(file_from, file_to)
		RSVGBIN.test_version
		
		png_content = RSVGBIN.png_content_from_file(file_from)
		Php.file_put_contents(file_to, png_content)
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
knjrbfw-0.0.8 lib/knj/rsvgbin.rb
knjrbfw-0.0.7 lib/knj/rsvgbin.rb
knjrbfw-0.0.4 lib/knj/rsvgbin.rb
knjrbfw-0.0.3 lib/knj/rsvgbin.rb