sam
13bbfb8b27
* Start working on colour reduction with a constrained palette.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2726 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
e50ce5c67a
* color.c: implement pipi_brightness() and pipi_contrast().
* pipi.c: add --brightness and --contrast.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2725 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
43e5e3a28d
* Add a NOTES file for random notes.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2724 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
jylam
22b3af001b
* Added string.h to list of included files, for memcpy()
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2722 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
jylam
7c5ed9890f
* Removed pipi/fill directory (I thought I had done this before. Hurra Pastis.)
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2721 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
37ab68e449
* blur.c: improve the Gaussian kernel generation by interpolating its
values in a quincunx pattern.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2719 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
18e1cc4471
* Add pipi_invert() to invert an image's colours.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2718 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
48b881b6fa
* Add pipi_tile, to create image mosaics.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2717 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
edd4a03a1e
* Add the --scale flag. Resizes the image like --geometry, except with
relative parameters.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2716 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
97930521fc
* blur.c: add an argument to the gaussian convolution to specify an angle.
Of course since the kernel is no longer separable, it becomes awfully
slow with large images. Here is a tileable brushed metal texture:
# pipi pipi:random512x512 --wrap --blur 20x0r25 -o image.png
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2715 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
3bcf099f65
* Allow pipi --blur to specify both the X and Y Gaussian sizes. Now we can
create some nice, tileable brushed metal textures:
pipi pipi:random15x15 --geometry 512x512 --wrap --blur 40 \
pipi:random512x512 --wrap --blur 10x0 --autocontrast --wrap \
--blur 20x0 --multiply -o image.png
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2713 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
555ba323e9
* pipi.c: add the --geometry flag (only wxh for now).
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2712 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
b74fad466b
* Implement difference, multiply, divide, screen and overlay blend methods.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2711 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
1e47505892
* convolution.c: move local function prototypes to convolution_template.h.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2710 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
b089bc14b6
* context.c: add the "swap" command to swap two images in the stack.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2709 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
da84205cde
* subadd.c: add pipi_sub() and pipi_add() as another way to combine two
images.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2708 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
a5ceceaf77
* stock.c: allow arbitrary sizes for the bayer stock image, even if they
give shitty results when used for ordered dithering.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2707 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
6fb5354eff
* minmax.c: add pipi_min() and pipi_max() as another way to combine two
images.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2706 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
9bd6b555f9
* mean.c: implement pipi_mean() to compute a mean image.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2705 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
31fd250bd2
* Support --autocontrast in pipi.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2704 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
7f3e08d021
* convolution.c: support for wrap-around in convolutions.
* pipi.c: add the "--wrap" flag to tell libpipi that a given image wraps
around.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2703 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
103e0629a2
* pipi.c: implement the "--gray" flag for grayscale conversion.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2702 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
ec187df115
* convolution_template.h: split convolution routines into separate functions
for each pixel format.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2701 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
25cdf35a86
* jajuni.c: add Jarvis-Judice-Ninke dithering. It's a Floyd-Steinberg-like
error diffusion method that has fewer high resolution structural artifacts
at the expense of resolution.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2700 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
b5500986b2
* floydsteinberg.c: minor optimisation in the FStein error propagation.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2699 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
b658564a1f
* context.c: fix an old bug that was incorrectly rounding down blur values.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2698 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
ee6e43cf81
* stock.c: generate images with random noise.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2697 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
eb9a270380
* pipi_dither_ordered() now takes two arguments; any image can be used as
the ordered dithering matrix. To get the old behaviour, use:
pipi image.png pipi:bayer8 --dither ordered out.png
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2696 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
3014994c61
* codec.c: support for stock images in pipi_load().
* stock.c: start working on stock image generation; for instance:
pipi pipi:bayer64 -o image.png
will generate a 64x64 Bayer dithering pattern and save it to image.png.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2695 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
d6b8cca4ec
* context.c: implement various dithering commands and Gaussian blur.
* pipi.c: add "--blur" and "--dither" commandline options.
* blur.c dither.c: remove these examples, pipi.c works a lot better:
pipi src.png --blur 10 dest.png
pipi src.png --dither dbs dest.png
(and of course combinations are possible)
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2694 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
0549f43287
* Start working on "pipi", a command-line libpipi tool. It will be similar
to convert, display, mogrify, animate etc. It can already convert between
image formats (eg. "pipi src.png -o dest.jpeg").
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2693 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
0f3943d0fe
* Add functions that handle a stack-based processing queue.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2692 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
1ff729fd7b
* convolution.c: fix a small memory leak in the convolution filter.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2684 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
77ec441434
* blur.c: implement box blur; currently runs in O(n) but we could make it
O(1) trivially.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2681 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
b7c2d1f847
* autocontrast.c: simple autocontrast filter; does not work very well.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2680 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
c269c219b2
* Get rid of test.c, it was no longer useful anyway.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2679 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
jylam
baa61a9f6d
* Handle alpha layer in floodfill (but don't make it conditionnal to the algorithm)
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2678 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
jylam
290e151913
* First shot of a floodfiller (both u32 and float, 4 neighbours)
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2676 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
53268650a7
* dbs.c: generate the initial halftone using random dithering instead of
Floyd-Steinberg in order to avoid the energy level getting locally stuck
around error diffusion structure artifacts.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2672 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
0eda956bfc
* random.c: implement random dithering using a deterministic pseudo-RNG.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2671 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
18dd51e1a5
* Dithering algorithms no longer modify the original image.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2670 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
2dc8bb35dd
* pipi.c: fix a memory leak caused by empty picture having codec_format
set to zero (and clashing with a real image format).
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2669 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
66f9ce5ea4
* pipi.c: implement pipi_copy().
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2668 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
a17c6753e3
* pixels.c: store byte length and bits-per-pixel value in the pipi_pixels_t
structure.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2667 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
41efcdecc0
* Prefix dithering functions with _dither_ to avoid namespace cluttering.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2666 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
6a3309663e
* ordered.c: implement Bayer dithering (pretty trivial).
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2665 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
a6dcd80490
* dbs.c: optimise DBS by ignoring 16x16 cells that had no pixel changes for
the last two iterations.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2664 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
2a3c7ca990
* dbs.c: improve the DBS human visual system kernel by adding two Gaussian
kernels.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2663 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
bf31390d1e
* sharpen.c: add a sharpen filter example, using our generic convolution
routine. Note that it is not the "real" sharpen which should be built
on top of a gaussian kernel.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2662 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
8c4591f1d9
* blur.c: remove the blurring code and use our generic convolution
routine, which correctly recognises the Gaussian kernel as a separable
filter. As a result, it is now 50% faster because the normalisation
occurs at kernel build time.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2661 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago