This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
gem 'ruby-vips' | |
gem 'oil' | |
require 'vips' | |
require 'oil' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* burr - simple filter to do cut ups for you | |
* | |
* No more scissors paper and glue! Turn your manual pages into disturbing, | |
* impressionistic accounts of drug addiction amongst homosexual hispanics in | |
* 1920's San Francisco. Turn your thesis into a lurid description of the | |
* thoughts of a man-crab roaming the brass streets of Minraud under a white | |
* hot sky. Free yourself of the language virus! | |
* | |
* Very simple minded - we: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from vipsCC import * | |
im = VImage.VImage(sys.argv[1]) | |
try: | |
# import to CIELAB with lcms | |
# 1 means relative colorimetry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'vips' | |
im = VIPS::Image.new(ARGV[0]) | |
begin | |
# import to CIELAB with lcms | |
# if there's no profile there, we'll fall back to the thing below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'vips' | |
a = VIPS::Image.jpeg(ARGV[0], :sequential => true) | |
# import to CIELAB colour space using the ICC profile embedded in the image | |
lab = a.icc_import_embedded(:relative) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
john@mm-jcupitt3 ~/GIT/libvips (7.26) $ CFLAGS="-g -Wall" CXXFLAGS="-g -Wall" ./configure --prefix=/home/john/vips-7.26 | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... /bin/mkdir -p | |
checking for gawk... gawk | |
checking whether make sets $(MAKE)... yes | |
checking build system type... x86_64-unknown-linux-gnu | |
checking host system type... x86_64-unknown-linux-gnu | |
checking for native Win32... no | |
checking for binary open needed... no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* compile with | |
* | |
* gcc -g -Wall try207.c `pkg-config vips --cflags --libs` | |
*/ | |
#include <stdio.h> | |
#include <vips/vips.h> | |
int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* compile with | |
* | |
* gcc -g -Wall try208.c `pkg-config vips --cflags --libs` | |
*/ | |
#include <vips/vips.h> | |
/* Create a tiny VipsOperator ... photographic negative of a uchar image. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* vips8 introspection demo | |
* | |
* compile with: | |
* | |
* gcc -g -Wall introspect.c `pkg-config vips --cflags --libs` | |
* | |
* This example needs vips 7.39 or later. | |
* | |
* try: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# "trim" is nnow built in, so this is easy | |
require 'vips' | |
im = Vips::Image.new_from_file(ARGV[0]) | |
left, top, width, height = im.find_trim | |
im = im.crop(left, top, width, height) |
OlderNewer