sam
4bfa33f1b9
Start writing Visual Studio projects.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2904 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
0eb36a6225
Support C99 types on Win32 through the same hacks as in libcaca.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2902 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
36438eed8f
Fix headers.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2844 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
37ed52dc95
* median.c: oops, fix argument types in the qsort call.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2808 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
82bb59111c
* median.c: use the libc's qsort to find the median value. Not really the
best method anyway (see the research notes on the wiki), but now X = 8
is faster than the previous implementation's X = 6.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2807 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
0cca668930
* pipi_template.h: factor the last unrolled preprocessor loop.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2806 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
daa741e235
* convolution.c: refactor the template functions, removing 30 lines of
code in the process.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2804 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
729fb74fec
* blur.c: support wrap around images in box blur (it's actually support for
non-wrap-around images; wrap around was the default behaviour).
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2802 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
916f579194
* blur.c: use the template system for the boxblur functions.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2801 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
5a9d928338
* blur.c: fix the separate filter optimisation in the blur code by not
interpolating the Gaussian kernel integral when dx = dy = angle = 0.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2800 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
8ddfafa5ba
* Rework the convolution template system.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2793 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
db9a8eae50
* convolution_template.h: clamp output values after a convolution.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2791 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
36fb60cacf
* transform.c: implement pipi_rotate90, pipi_rotate180 and pipi_rotate270.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2750 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
2da45f954b
* Implement pipi_vflip() and pipi_hflip().
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2749 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
412dafd400
* median.c: oops, removed old debugging hack from pipi_median().
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2748 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
0cab178432
* color.c: implement pipi_threshold().
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2747 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
31fec9b526
* Add pipi_dilate() / pipi_erode() and --dilate / --erode.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2746 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
114afed869
* median.c: fix the RGBA median filter.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2745 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
d9f3b654bc
* median.c: add a median filter. Highly unoptimised for now.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2744 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
a1ad690056
* blur.c: proper box blur implementation that runs linearly with
pixel count.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2743 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
8e5b11ae39
* convolution_template.h: disambiguate parentheses.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2741 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
8996a532df
* blur.c: improve the Gaussian kernel interpolation.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2737 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
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
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
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
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
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
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
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
sam
03ca8dc76d
* convolution.c: automatically detect when a convolution filter is separable
and switch algorithms to speed up processing.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2660 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
89f35cb8fd
* convolution.c: generic convolution method. Does not take advantage of
separable kernels yet.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2658 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
4a278923ff
* blur.c: adapt the kernel size to large values of dx and/or dy.
* blur.c: fix the dx/dy sign meaning.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2643 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
a11f92ff95
* blur.c: support for greyscale images.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2634 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
877e7b21a9
* filter/blur.c: avoid annoying side effects with very small or negative
blur radii.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2619 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
ea38654c88
* filter/blur.c: minor optimisation in the kernel generation.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2618 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
4a857277a7
* blur.c: support for variable blur radius and Gaussian offset.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2617 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
42af43ad99
* blur.c: separated blur; it's now incredibly faster.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2608 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
af0c7f52fb
* blur.c: fix overflow errors.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2606 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
31328a14aa
* Big API reorganisation. Now libpipi can transparently convert between
colour spaces for a given image. For instance, if pipi_gaussian_blur is
applied to a 32-bpp image, it is automatically converted to gamma-corrected
32-bit floats beforehands, then converted back to normal.
* TODO: clipping, regions of interest, more formats, getpixel macros...
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2605 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago
sam
7d147f3576
* Test implementation of Gaussian blurring. It's awfully slow and does not
use the separation property, but it's just for a test.
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2603 92316355-f0b4-4df1-b90c-862c8a59935f
16 years ago