File: example4.rb

package info (click to toggle)
ruby-vips 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,164 kB
  • sloc: ruby: 3,530; makefile: 3
file content (18 lines) | stat: -rwxr-xr-x 366 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/ruby

require "vips"

# this makes vips keep a list of all active objects
Vips.leak_set true

# disable the operation cache
# Vips::cache_set_max 0

# turn on debug logging
# Vips.set_debug true

ARGV.each do |filename|
  im = Vips::Image.new_from_file filename
  profile = im.get_value "icc-profile-data"
  puts "profile has #{profile.length} bytes"
end