Commit Graph

331 Commits

Author SHA1 Message Date
Rupert Weber e986310e3e Bug 630201 - remove unused layer-modes.c in app/paint-funcs
The compositing functions in layer-modes.c have been obsolete
for seven years now, since gimp-composite was made default
by 1b33a15e03 in 2003.
2010-10-06 21:26:14 +02:00
Alexia Death 2c4c9ad333 app: Clean up the hardness feature. Lets convolve PixelRegions. 2010-01-01 18:16:29 +02:00
Alexia Death 9774988f30 Real dynamic hardness support for both generated and pixmap brushes.
For generated brushes, dynamic input is applied on top of the set hardness as a factor.
For pixmaps, it influences the amount of blur applied to the stamp. Be warned, process is slow
for large pixmaps. The odd feature previously advertised as hardness is left in but disabled.
If I figure out what it should be exposed as, it might be made available again.
2010-01-01 15:54:31 +02:00
Sven Neumann fab84cac88 Bug 571628 – Scaling image to 25% turn background from white to grey
2009-02-13  Sven Neumann  <sven@gimp.org>

	Bug 571628 – Scaling image to 25% turn background from white to 
grey

	* app/paint-funcs/scale-region.c (pixel_average2): fixed 
right-shift
	for GRAYA pixels.


svn path=/trunk/; revision=28025
2009-02-13 20:44:47 +00:00
Martin Nordholts 4d7a6b10d1 Added .gitignore files generated with git svn create-ignore.
svn path=/trunk/; revision=27972
2009-01-31 11:37:44 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Martin Nordholts ddaa0b48ec s/temp_buf_data/temp_buf_get_data/
* app/base/pixel-region.c
* app/base/temp-buf.c
* app/base/temp-buf.h
* app/core/gimpbrush-load.c
* app/core/gimpbrush-scale.c
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpgradient.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern-load.c
* app/core/gimppattern.c
* app/core/gimppreviewcache.c
* app/core/gimpviewable.c
* app/paint-funcs/paint-funcs-generic.h
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimpink.c
* app/paint/gimppaintbrush.c
* app/pdb/brush-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/drawable-cmds.c
* app/pdb/image-cmds.c
* app/pdb/pattern-cmds.c
* app/pdb/patterns-cmds.c
* app/text/gimpfont.c
* app/tools/gimpiscissorstool.c
* app/vectors/gimpvectors-preview.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimppatternselect.c
* app/widgets/gimpviewrenderer.c

svn path=/trunk/; revision=27782
2008-12-13 10:35:53 +00:00
Sven Neumann 8ad82efc25 Bug 560283 – "Scale image..." causes distortion around edges.
2008-11-11  Sven Neumann  <sven@gimp.org>

	Bug 560283 – "Scale image..." causes distortion around edges.

	* app/paint-funcs/scale-region.c (scale): corrected fix for
	bug #556248.


svn path=/trunk/; revision=27612
2008-11-11 07:47:31 +00:00
Martin Nordholts 5d7bf3ca4b Implemented Erase, Anti Erase, Color Erase and Replace. These are not
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Implemented Erase, Anti
Erase, Color Erase and Replace. These are not normal layer modes
and handle alpha in their own way. In addition to this, the
behavior of Replace doesn't map very well to GEGL which uses
infinite sized "layers".

Completely works the same:
 o Erase
 o Anti Erase
 o Color Erase

Works different but similar:
 o Replace

* app/paint-funcs/paint-funcs.[ch]: Expose
paint_funcs_color_erase_helper() so it can be used in the
GimpOperationPointLayerMode implementation. Once the migration is
complete this function can be moved entirely to the op and be
tailored to work on premultiplied data.

svn path=/trunk/; revision=27502
2008-10-31 21:02:26 +00:00
Sven Neumann 064f2afd85 Bug 557950 – Scaling in Gimp 2.6 is much slower than in Gimp 2.4
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 557950 – Scaling in Gimp 2.6 is much slower than in Gimp 2.4

	* app/paint-funcs/scale-region.c: don't do multi-pass scaling 
when
	we are scaling up.


svn path=/trunk/; revision=27462
2008-10-29 19:37:52 +00:00
Sven Neumann 8626bed826 use the inverse of the scale factor so that we can multiply instead of
2008-10-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): use the inverse of the
	scale factor so that we can multiply instead of dividing in the
	loops.


svn path=/trunk/; revision=27380
2008-10-23 22:07:59 +00:00
Martin Nordholts e38ca5490a Rename the convenient channel offset defines from FOO_PIX to FOO as this
* app/base/base-types.h: Rename the convenient channel offset
defines from FOO_PIX to FOO as this increases readability.

* app/base/color-balance.c
* app/base/colorize.c
* app/base/desaturate.c
* app/base/hue-saturation.c
* app/base/siox.c
* app/base/threshold.c

* app/core/gimp-edit.c
* app/core/gimp-transform-region.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-convert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpdrawable.c
* app/core/gimpimage-convert.c
* app/core/gimpimage.c
* app/core/gimppalette-import.c
* app/core/gimppickable.c

* app/gegl/gimpoperation*mode.c
* app/gegl/gimpoperationcolorbalance.c
* app/gegl/gimpoperationcolorize.c
* app/gegl/gimpoperationhuesaturation.c
* app/gegl/gimpoperationlevels.c
* app/gegl/gimpoperationposterize.c
* app/gegl/gimpoperationthreshold.c

* app/paint-funcs/subsample-region.c

* app/paint/gimpclone.c
* app/paint/gimppaintbrush.c

* app/widgets/gimpviewrenderer.c: Adapt.

svn path=/trunk/; revision=27324
2008-10-19 13:47:09 +00:00
Sven Neumann f55b832bd3 Bug 556248 – Scaling gives 'jagged' edges
2008-10-16  Sven Neumann  <sven@gimp.org>

	Bug 556248 – Scaling gives 'jagged' edges

	* app/paint-funcs/scale-region.c (scale): calculate pixel
	contributions based on pixel centers, not on pixel origins.


svn path=/trunk/; revision=27292
2008-10-15 22:43:27 +00:00
Sven Neumann b387734c3d Bug 547967 – Improve app/paint-funcs/ maintainability
2008-10-13  Sven Neumann  <sven@gimp.org>

	Bug 547967 – Improve app/paint-funcs/ maintainability

	Applied patch from Luidnel Maignan that splits the legacy code 
for
	layer modes into new files.
	
	* app/paint-funcs/Makefile.am
	* app/paint-funcs/layer-modes.[ch]
	* app/paint-funcs/paint-funcs-utils.h: new files with code taken
	from ...

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: ... these two files.


svn path=/trunk/; revision=27268
2008-10-13 18:51:32 +00:00
Michael Natterer 62e7dcc640 reorder sections consistently. Remove redundant CFLAGS.
2008-10-07  Michael Natterer  <mitch@gimp.org>

	* app/*/Makefile.am: reorder sections consistently. Remove
	redundant CFLAGS.


svn path=/trunk/; revision=27163
2008-10-07 11:58:14 +00:00
Sven Neumann 2aeb40ac96 removed debug output.
2008-10-06  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale_region): removed debug
	output.


svn path=/trunk/; revision=27149
2008-10-06 20:47:55 +00:00
Sven Neumann ce43257d5b Applied 'gimp-decimate.diff' as announced on the mailing-list:
2008-09-07  Sven Neumann  <sven@gimp.org>

	Applied 'gimp-decimate.diff' as announced on the mailing-list:

	* app/gimp-log.[ch]: added log domain "scale".

	* app/paint-funcs/scale-region.c: replaced decimation routines
	with box filters. Only use the decimation routines to pre-scale
	the image, always apply the interpolation for the final step.


svn path=/trunk/; revision=26896
2008-09-07 21:13:09 +00:00
Sven Neumann a5f8345609 added clear_region().
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added clear_region().

	* app/base/tile-manager-crop.c
	* app/core/gimpchannel.c
	* app/core/gimpimage-merge.c
	* app/core/gimpmaskundo.c
	* app/core/gimpprojection-construct.c: use it instead of calling
	color_region() with a zero color.



svn path=/trunk/; revision=26826
2008-09-01 20:44:00 +00:00
Sven Neumann c9c3329441 fixed shift direction.
2008-08-28  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale_determine_progress):
	(scale_region_tile): fixed shift direction.


svn path=/trunk/; revision=26797
2008-08-28 08:46:08 +00:00
Sven Neumann 6a3e8b4cca sprinkled more const qualifiers.
2008-08-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: sprinkled more const 
qualifiers.

	* app/paint-funcs/scale-region.c: call the progress callback 
less
	often.


svn path=/trunk/; revision=26790
2008-08-27 10:19:15 +00:00
Sven Neumann 7a0dd79621 removed another unneeded cast that I missed earlier
svn path=/trunk/; revision=26782
2008-08-26 20:32:24 +00:00
Sven Neumann 58160691c2 removed unneeded casts
svn path=/trunk/; revision=26781
2008-08-26 19:55:12 +00:00
Sven Neumann ad4eb2f528 further simplified the code path that is executed when a brush is scaled
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: further simplified the code 
path
	that is executed when a brush is scaled up. We don't need to 
scale
	in several steps here.


svn path=/trunk/; revision=26780
2008-08-26 19:52:35 +00:00
Sven Neumann 8499f5e247 removed some unused parameters from the code that is used for brush
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: removed some unused parameters
	from the code that is used for brush scaling. Added sanity 
checks.


svn path=/trunk/; revision=26779
2008-08-26 19:43:00 +00:00
Sven Neumann 4fe29ba110 use PixelSurround to access the source pixels in a more efficient way.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: use PixelSurround to access 
the
	source pixels in a more efficient way.


svn path=/trunk/; revision=26768
2008-08-25 23:12:14 +00:00
Sven Neumann 106072e3b8 moved scale_region() to the top of the file
svn path=/trunk/; revision=26766
2008-08-25 18:43:24 +00:00
Sven Neumann 184c85e985 minor cleanup
svn path=/trunk/; revision=26762
2008-08-25 17:34:28 +00:00
Sven Neumann 9584208543 reverted last change; it was bogus.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: reverted last change; it was 
bogus.


svn path=/trunk/; revision=26761
2008-08-25 17:26:32 +00:00
Sven Neumann df292234f2 don't scale in several steps if interpolation is GIMP_INTERPOLATION_NONE.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: don't scale in several steps 
if
	interpolation is GIMP_INTERPOLATION_NONE.


svn path=/trunk/; revision=26760
2008-08-25 16:30:37 +00:00
Sven Neumann 6fb1940834 implemented uses integer arithmetic. (pixel_average): reduced rounding
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (gaussian_decimate)
	(gaussian_lanczos2): implemented uses integer arithmetic.
	(pixel_average): reduced rounding errors.


svn path=/trunk/; revision=26759
2008-08-25 16:20:59 +00:00
Sven Neumann 5970750152 further code cleanup and some documentation
svn path=/trunk/; revision=26752
2008-08-25 10:26:41 +00:00
Sven Neumann c206db2c2a fixed progress feedback.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: fixed progress feedback.


svn path=/trunk/; revision=26751
2008-08-25 08:03:44 +00:00
Sven Neumann 46ee36089c improved progress bar calculations. Still buggy though.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: improved progress bar
	calculations. Still buggy though.


svn path=/trunk/; revision=26750
2008-08-25 07:42:49 +00:00
Sven Neumann 4ec451658c another small cleanup
svn path=/trunk/; revision=26749
2008-08-25 07:10:14 +00:00
Sven Neumann aa5cca0002 some more cleanups.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: some more cleanups.


svn path=/trunk/; revision=26748
2008-08-25 06:46:26 +00:00
Sven Neumann 93e5a3d293 use a constant to decide if we should decimate or interpolate.
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale) (scale_pr): use a
	constant to decide if we should decimate or interpolate.


svn path=/trunk/; revision=26736
2008-08-24 00:08:39 +00:00
Sven Neumann 510e21219f instead of iterating over tiles manually and using write_pixel_data_1() to
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: instead of iterating over 
tiles
	manually and using write_pixel_data_1() to write the data, use
	pixel_region_process() to iterate over the destination.


svn path=/trunk/; revision=26735
2008-08-23 23:59:09 +00:00
Sven Neumann bb61099be5 added more const qualifiers.
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: added more const qualifiers.


svn path=/trunk/; revision=26734
2008-08-23 23:43:31 +00:00
Sven Neumann c7f3b68c08 sprinkled with const qualifiers. Moved calculations out of the loops.
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): sprinkled with const
	qualifiers. Moved calculations out of the loops.


svn path=/trunk/; revision=26733
2008-08-23 23:13:18 +00:00
Sven Neumann d588580cba removed optimization of the case where the source and dest regions are the
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): removed optimization 
of
	the case where the source and dest regions are the same size. 
This
	should not happen any longer.


svn path=/trunk/; revision=26732
2008-08-23 22:58:16 +00:00
Sven Neumann 8187067243 avoid unnecessary scaling when scaling factor is 2^n. (pixel_average):
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (determine_scale): avoid
	unnecessary scaling when scaling factor is 2^n.
	(pixel_average): replaced with optimized pixel averager from
	tile-pyramid.c (from the gimp-2-4 branch with some minor
	corrections).


svn path=/trunk/; revision=26731
2008-08-23 22:43:21 +00:00
Sven Neumann 6203139692 replaced code that copies pixels from one tile-manager to another by a
2008-08-23  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): replaced code that
	copies pixels from one tile-manager to another by a call to
	copy_region().


svn path=/trunk/; revision=26730
2008-08-23 21:39:11 +00:00
Sven Neumann 4d38e14aa9 applied patch from Luidnel Maignan (followup to bug #105568).
2008-08-13  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (replace_inten_pixels): applied
	patch from Luidnel Maignan (followup to bug #105568).


svn path=/trunk/; revision=26535
2008-08-13 19:03:57 +00:00
Sven Neumann fc2f433d98 applied patch from Geert Jordaens to fix scaling artifacts in top row (bug
2008-08-13  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: applied patch from Geert
	Jordaens to fix scaling artifacts in top row (bug #464466).


svn path=/trunk/; revision=26534
2008-08-13 19:02:23 +00:00
Sven Neumann a39600752f followup change for bug #105568
svn path=/trunk/; revision=26527
2008-08-12 20:50:06 +00:00
Sven Neumann f35066ffe4 applied a slightly modified version of the patch from Luidnel Maignan as
2008-08-12  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c (replace_inten_pixels): applied 
a
	slightly modified version of the patch from Luidnel Maignan as
	attached to bug #105568. Fixes incorrect alpha treatment in
	plug-in selection masking.


svn path=/trunk/; revision=26524
2008-08-12 20:01:19 +00:00
Sven Neumann 5367771e4a sprinkled with const qualifiers. Fixed some portability problems.
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: sprinkled with const 
qualifiers.
	Fixed some portability problems.


svn path=/trunk/; revision=26429
2008-08-07 20:48:42 +00:00
Sven Neumann 93627c517b trivial coding style fix
svn path=/trunk/; revision=26369
2008-08-04 21:47:25 +00:00
Sven Neumann 85a6313ecb applied patch from Geert Jordaens as attached to bug #464466. Improves
2008-08-04  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: applied patch from Geert
	Jordaens as attached to bug #464466. Improves quality of 
scaling,
	in particular down-scaling.


svn path=/trunk/; revision=26368
2008-08-04 20:58:41 +00:00
Sven Neumann 9d1e4d278b minor formatting cleanup.
2008-03-19  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.c: minor formatting cleanup.

svn path=/trunk/; revision=25122
2008-03-19 10:51:12 +00:00