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
Sample output. Everything is ref-counted, so the profile sticks around across the cast. | |
$ ./a.out ~/pics/shark2.jpg x.jpg | |
profile: 3048 bytes at 0x1321350 | |
profile: sRGB IEC61966-2-1 black scaled | |
profile: 3048 bytes at 0x1321350 | |
profile: sRGB IEC61966-2-1 black scaled | |
memory: high-water mark 4.15 MB | |
$ |
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
/* test the load jpeg from memory path in vips | |
* | |
* compile with: | |
* | |
* gcc -g -Wall try88.c `pkg-config vips --cflags --libs` | |
* | |
* test with: | |
* | |
* export G_DEBUG=gc-friendly | |
* export G_SLICE=always-malloc |
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 -Wall rawsave.c `pkg-config vips --cflags --libs` | |
*/ | |
#include <vips/vips.h> | |
int | |
main( int argc, char **argv ) |
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
/* test gsf zip write | |
* | |
* compile with: | |
* | |
* gcc -g -Wall gsf.c $(pkg-config libgsf-1 --cflags --libs) | |
*/ | |
#include <stdio.h> | |
#include <string.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
/* Benchmark random reading from a zip file with libgsf. | |
* | |
* Compile with | |
* | |
* gcc gsf-bench.c `pkg-config libgsf-1 --cflags --libs` | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.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
/* Benchmark random reading from a zip file with libgsf. | |
* | |
* Compile with | |
* | |
* gcc gsf-bench2.c `pkg-config libgsf-1 --cflags --libs` | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.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
/* Benchmark random reading from a zip file with libgsf. | |
* | |
* Compile with | |
* | |
* gcc -g -Wall gsf-bench3.c `pkg-config libgsf-1 --cflags --libs` | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.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
/* test vips_gaussblur() | |
* | |
* compile with: | |
* | |
* gcc -g -Wall try214.c `pkg-config vips --cflags --libs` | |
* | |
* test with: | |
* | |
* valgrind --db-attach=yes ./a.out 100 ~/pics/babe.tif x.tif | |
*/ |
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
/* test load/save with streams | |
* | |
* compile with: | |
* | |
* gcc -g -Wall copy-stream.c `pkg-config vips --cflags --libs` | |
* | |
* test with: | |
* | |
* cat ~/pics/k2.jpg ~/pics/k4.jpg | ./a.out | cat > x | |
*/ |
OlderNewer