Michael Natterer
ff931e1ded
app: move gimp_babl_format_get_base_type() to gimp-babl.[ch]
...
The GimpImageBaseType enum is going to go away, but a format -> enum
API is going to stay around.
2012-05-02 17:51:08 +02:00
Michael Natterer
e6975ed065
app: add format parameter to GimpPickable::get_pixel_at()
...
allowing NULL for the pickable's native format. Fix and simplify auto
cropping to always use "R'G'B'A u8".
2012-05-02 17:51:07 +02:00
Michael Natterer
9d518677d2
app: remove gimpdrawable-convert.[ch]
...
This can now be done in gimp_drawable_real_convert_type() with a few
lines of GEGL buffer copying.
2012-05-02 17:51:03 +02:00
Michael Natterer
95cb77edc9
app: change gimp_image_get_format() to take a base_type and a with_alpha boolean
...
which kills almost all remaining use of GimpImageType.
2012-05-02 17:51:03 +02:00
Michael Natterer
ec2d5647c0
app: remove gimp_drawable_type_with_alpha()
2012-05-02 17:50:57 +02:00
Michael Natterer
3c4f9d55ed
app: use the new functions added with the last commit
2012-05-02 17:50:57 +02:00
Michael Natterer
2b18645fb5
app: use gimp_drawable_get_base_type() instead of GIMP_IMAGE_TYPE_BASE_TYPE()
2012-05-02 17:50:57 +02:00
Michael Natterer
f6f7d53020
app: add gimp_drawable_get_base_type()
2012-05-02 17:50:57 +02:00
Michael Natterer
afe8eaf256
app: remove GimpImageType based API and macro junk
2012-05-02 17:50:57 +02:00
Michael Natterer
368ae01c86
app: don't special case the FS wrt its visibility in the layer stack
...
Its source node produces nothingness anyway, so it can be safely
plugged in. More FS special code gone \o/.
2012-05-02 17:50:54 +02:00
Michael Natterer
8cca4c51ad
app: use gimp_gegl_node_set_layer_mode() to configure the FS' mode node
2012-05-02 17:50:54 +02:00
Øyvind Kolås
6efd812d08
app: s/GIMP_GEGL_RECT/GEGL_RECTANGLE/
...
Defining GeglRectangle inline is so useful that it has been added to
GEGL.
2012-05-02 17:50:52 +02:00
Michael Natterer
8dfea70191
app: fix GIMP_TIMER_END() to take an arbitrary string
...
not a string constant that only works in the C preprocessor, and add a
timer to gimp_apply_operation().
2012-05-02 17:50:43 +02:00
Michael Natterer
1a34171e68
app: remove the legacy option in gimp_drawable_scale()
2012-05-02 17:50:42 +02:00
Michael Natterer
87b7af7fa5
app: remove drawable->private->format, its buffer has a format already
...
Also, make group layer type conversion much less hackish by using the
same kind of temporary states that are used for reallocating its
projection on size change.
2012-05-02 17:50:42 +02:00
Michael Natterer
2a853cd1ee
app: remove GimpPickable::get_bytes()
2012-05-02 17:50:42 +02:00
Michael Natterer
5e754a9641
app: remove GimpPickable::get_image_type()
2012-05-02 17:50:42 +02:00
Øyvind Kolås
76546f7e7c
rename lanczos to lohalo
...
GEGL had a broken lanczos implementation, the lohalo implementation is better
anyways (at least when passed a proper scale matrix).
2012-05-02 17:50:38 +02:00
Øyvind Kolås
ee97c1f4ff
app: correct usage of babl formats
...
GIMP was doing evil hacks lying to GEGL about it's pixels being in a linear
color space when they are not. This causes incorrect rendering, makes gaussian
blur misbehave etc.
The legacy projection modes should be implemented using the same 2.2 gamma
formats that are correct to specify for sRGB data. (for proper color
management in higher bitdepths; icc backend babl formats should be used.)
For the old image modes correct babl formats are:
R'G'B'A u8 - 8 bit RGB with 2.2 gamma (sRGB) with linear alpha component
R'G'B' u8 - 8 bit RGB with 2.2 gamma (sRGB)
Y'A u8 - 8 bit Grayscale with 2.2 gamma with linear alpha component
Y' u8 - 8 bit Grayscale with 2.2 gamma
Y u8 - 8 bit linear data, used for masks/channels
A u8 - 8 bit linear alpha
-----------------------------------------------
RGBA float - 32bit floating point linear light RGB
RaGaBaA float - 32bit floating point linear light RGB, premultiplied alpha
to be used for processing that needs to scale by the alpha,
(blurs, resampling etc)
R'G'B'A float - 32bit floating point sRGB with gamma, to be used where
the result depends on being closer to perceptual when
processing, can be used a cheaper alternative to CIE Lab
based modes.
-----------------------------------------------
The legacy layer modes should use the formats with gamma 2.2 only for loading
and rendering legacy XCF files correctly, in the brave new world compositing
should most likely be done in linear light with "RGBA float" and even better
"RaGaBaA float" like GEGL does for porter duff and other compositing modes.
The ability to chose the legacy layer modes should probably be hidden from the
user unless an old .xcf has been opened.
2012-05-02 17:50:38 +02:00
Michael Natterer
97f6061a91
app: remove some obsolete legacy includes from gimpdrawable.c
2012-05-02 17:46:16 +02:00
Øyvind Kolås
f68c3c7051
app: adapt to API changes in GEGL
2012-05-02 17:46:15 +02:00
Michael Natterer
2b6b5a8ada
app: remove unused base/ includes
2012-05-02 17:46:15 +02:00
Michael Natterer
be853cd239
app: remove "gboolean linear" from all apply_operation APIs
...
thes were all unused and we want to get rid of that anyway.
2012-05-02 17:46:13 +02:00
Michael Natterer
7223af17a2
app: completely port GimpDrawable::apply_region()'s API to GeglBuffer
...
and pass lots of coords that were hidden inside PixelRegions
explicitly.
2012-05-02 17:46:12 +02:00
Michael Natterer
061e044e0a
app: change GimpDrawable::replace_region() by ::replace_buffer()
2012-05-02 17:46:12 +02:00
Michael Natterer
4bcddb04a2
app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer
2012-05-02 17:46:11 +02:00
Michael Natterer
579d894778
app: turn GimpDrawable::apply_region() into ::apply_buffer()
...
and GimpDrawableUndo.src2_tiles into applied_buffer.
2012-05-02 17:46:11 +02:00
Michael Natterer
ea8eebcd47
app: support TempBuf backed buffer in gimp_drawable_apply_buffer()
2012-05-02 17:46:11 +02:00
Michael Natterer
d9825e0aea
app: use gimp_drawable_apply_buffer() for legacy FS composition
2012-05-02 17:46:11 +02:00
Michael Natterer
99ae46b4ed
app: turn the drawable's shadow tiles into a shadow buffer
2012-05-02 17:46:10 +02:00
Michael Natterer
dbc881376e
app: add gimp_drawable_apply_buffer() and port edit, bucket fill, stroke
2012-05-02 17:46:10 +02:00
Michael Natterer
904a35d722
app: remove width, height from GimpDrawableUndo and GimpDrawable::swap_tiles()
...
because we always store/swap a buffer of the actual size now.
2012-05-02 17:46:09 +02:00
Michael Natterer
a0c1007b66
app: port GimpDrawableUndo, GimpDrawable::push_undo() and ::swap_tiles()
...
which gets rid of the manual implementation of sparse undo buffers,
but GEGL will take care of proper COW here soo enough.
2012-05-02 17:46:08 +02:00
Michael Natterer
153f56655a
app: rename the buffer's tile_source_node to buffer_source_node
2012-05-02 17:46:08 +02:00
Michael Natterer
a982a5ea3a
app: change GimpDrawable::get_tiles() to ::get_buffer()
...
and shuffle code around because the other API is now virtual.
2012-05-02 17:46:07 +02:00
Michael Natterer
f8f4455459
app: change GimpDrawable::set_tiles() to ::set_buffer()
...
and remove the "type" argument, GeglBuffers have a format.
2012-05-02 17:46:07 +02:00
Michael Natterer
9d260c380b
app: completely port gimpdrawable-convert.c to GeglBuffer
2012-05-02 17:46:07 +02:00
Michael Natterer
c4f88e5166
app: port gimp_drawable_scale() to gimp_drawable_set_buffer_full()
2012-05-02 17:46:07 +02:00
Michael Natterer
9774bb62e7
app: use hard-edges = TRUE when GEGL-scaling drawables
2012-05-02 17:46:07 +02:00
Michael Natterer
d5795c0081
app: use a GeglBuffer instead of TileManager as storage in drawables \o/
2012-05-02 17:46:06 +02:00
Michael Natterer
765c2cfea2
app: replace GimpDraable's type by a Babl format
...
and change gimp_drawable_new() and all gimp_layer_new() variants to
take formats instead of types.
2012-05-02 17:46:06 +02:00
Michael Natterer
525a405270
app: port the entire transform API from TileManager to GeglBuffer
2012-05-02 17:46:06 +02:00
Michael Natterer
b89a912cc7
app: use gimp_drawable_set_buffer() in a few places
2012-05-02 17:46:05 +02:00
Øyvind Kolås
f8b1372038
app: make use of GIMP_GEGL_RECT in more places
2012-05-02 17:46:05 +02:00
Michael Natterer
6274b269ca
app: add gimp_drawable_set_buffer() and set_buffer_full()
2012-05-02 17:46:05 +02:00
Øyvind Kolås
fe3220ae6f
app: remove write property of GeglBuffer backend
2012-05-02 17:46:05 +02:00
Michael Natterer
0bcae125b5
app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
...
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
Michael Natterer
69c52173fb
app: change gimp_gegl_color_set_rgba() to gimp_gegl_color_new()
...
which saves one line of code in every single use case.
2012-05-02 17:46:03 +02:00
Michael Natterer
58dfa962a1
app: port simple rotating and flipping to GEGL
...
Which requires making the entire copy/paste apparatus aware of the
Babl format of the passed around tile managers.
2012-05-02 17:46:02 +02:00
Michael Natterer
62a23f8a89
app: port drawable'e and projection's get_pixel_at() to gegl_buffer_sample()
2012-05-02 17:46:02 +02:00