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
#!/bin/bash | |
run() { | |
cmd="$*" | |
$cmd | |
if [ $? != 0 ]; then | |
echo ===================== | |
echo $cmd | |
echo failed | |
exit 1 |
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/python3 | |
# setup with: | |
# | |
# mkdir sample | |
# cd sample | |
# for i in {1..300}; do cp ~/pics/k2.png $i.png; done | |
# | |
# on this modest 2015 laptop running Ubuntu 20.04, I see: | |
# |
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/python3 | |
import sys | |
import os | |
import pyvips | |
if len(sys.argv) < 3: | |
print(f"usage: {sys.argv[0]} grey-card-image image1 image2 ...") | |
print(f" light-correct a set of images with a grey card") | |
print(f" corrected images writtem to lc_image1, lc_image2, etc.") |
This file has been truncated, but you can view the full file.
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
<?xml version="1.0"?> | |
<!-- This file was automatically generated from C sources - DO NOT EDIT! | |
To affect the contents of this file, edit the original C definitions, | |
and/or use gtk-doc annotations. --> | |
<repository version="1.2" | |
xmlns="http://www.gtk.org/introspection/core/1.0" | |
xmlns:c="http://www.gtk.org/introspection/c/1.0" | |
xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> | |
<include name="GObject" version="2.0"/> | |
<c:include name="vips/vips.h"/> |
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 custom.c `pkg-config vips --cflags --libs` | |
* | |
* Run with: | |
* | |
* ./a.out ~/pics/k2.jpg x.jpg | |
* | |
*/ |
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
/* watermark a fax image with vips8 C | |
* | |
* compile with | |
gcc -g -Wall watermark_fax.c `pkg-config vips --cflags --libs` | |
*/ | |
#include <vips/vips.h> |
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
/* watermark a fax image with vips8 C | |
* | |
* compile with | |
gcc -g -Wall watermark_fax.c `pkg-config vips --cflags --libs` | |
*/ | |
#include <vips/vips.h> |
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 php | |
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use Jcupitt\Vips; | |
$im = Vips\Image::newFromFile($argv[1], ['access' => 'sequential']); | |
# 3D histogram ... make 10 x 10 x 10 bins, so 1000 possible colours | |
$n_bins = 10; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HELLO GOOBLERAMPLING</title> | |
</head> | |
<body> | |
<a href="viewerPage.html" target="_blank" id="myPicture"> | |
<img src="thePic.png"> | |
</a> |
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: | |
* |