It is currently Thu Sep 24, 2026 9:46 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: value invert
PostPosted: Mon Apr 13, 2015 8:18 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: New User



Hi all,

from time to time I make use of Gimp Color Value Invert native filter (duplicate layer, value-invert, strong gaussian blur on the inverted values layer, mode set to overlay, opacity to the appropriate percentage; this improves -when the case- the colours of an image)
Now my questions:
1-the inverted colours layer looks to me always "pixelated", at least in some areas, while the source looks not; is this due to a choice of the filter author to accelerate the operation? or is there any other reason?
2-is there an equivalent function in G'MIC? I'm quite sure there is, but I'm not able to find it...

Thanks!

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 8:36 am  (#2) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
I think you need to show us an example of this "pixelation" that you are seeing.

And also, does the layer you are colour-inverting have any transparency on it?

Kevin


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 9:00 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
OK
just taken one
"pixelation" seems to occur on the dark (original) values

original
Attachment:
2004_0208_Carlotta_Image1.jpg
2004_0208_Carlotta_Image1.jpg [ 277.72 KiB | Viewed 6493 times ]


inverted values
Attachment:
2004_0208_Carlotta_Image1_IV.jpg
2004_0208_Carlotta_Image1_IV.jpg [ 400.89 KiB | Viewed 6493 times ]


no transparency (as far as I see)

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 9:14 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
another example
original:
Attachment:
2007-0719_Pana_007.jpg
2007-0719_Pana_007.jpg [ 401.96 KiB | Viewed 6488 times ]


value inverted
Attachment:
2007-0719_Pana_007_VI.jpg
2007-0719_Pana_007_VI.jpg [ 902.99 KiB | Viewed 6488 times ]


still in the (originally) dark areas: maybe the original is also pixelated but my eyes do not see it?

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 9:32 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
maybe this behaviour on dark pixels is known around.
by googling I found a comment on a gimp script (old) which says:

GIMP: YCC Inversion by Stratadrake
Resources & Stock Images / Application Resources / GIMP Scripts & Plugins
The inversion technique I use to create all my inversions of traditional media is a three-step process neither difficult nor (very) time-consuming, but even so; here's a GIMP script to perform those steps automatically, with just a single click.
...

Overview
The script performs a brightness-inversion of the current image layer, swapping light and dark tones while leaving color data (hue and saturation) more or less unchanged. The end result is similar to the GIMP's "Value Invert" command, but without the color distortion produced at low RGB values

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 9:40 am  (#6) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
No, the pixellation IS present in the original photo ..if you zoom to 800% you can clearly see 8x8 pixel blocks ..it's probably just an artefact caused by the JPEG compression.


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 9:43 am  (#7) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
The Value invert just shows up the pixellation present in the photo much more ..compare with Invert ..you can see the pixellation after Invert at 800% but at 100% the edges merge ..after Value invert the edges don't merge!


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 9:43 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
I wanted to double-check the last comment I posted, concerning an old script
downloaded and installed
it works w/o changes even if old
the result (as the colours are concerned) is much different from standard value invert, but the effect to improve the colours of an image by overlaying this with the original seems good
maybe I had the opportunity to discover (and share) and old useful script

outcome from luma-invert
Attachment:
2007-0719_Pana_007-LumaInvert.jpg
2007-0719_Pana_007-LumaInvert.jpg [ 472.82 KiB | Viewed 6470 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 9:50 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
jontait2 wrote:
The Value invert just shows up the pixellation present in the photo much more ..compare with Invert ..you can see the pixellation after Invert at 800% but at 100% the edges merge ..after Value invert the edges don't merge!

hence? is there a problem in the filter itself? does it mean that "value-invert" operates on an image at 800% then takes one pixel out of the 8?
I'm not a graphic expert, but following what you said, jontait, it looks so.
(Any image at 800% very likely is pixelated, you don't think so?)
also: what's your comment on the comment of the author of the script just found?

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 10:03 am  (#10) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
You are assuming that Gimp is working in "linear light", and AFAIK this isn't true (at least before 2.9, where "linear light" becomes an option).

www.youtube.com Video from : www.youtube.com


What this means is that the same perceived amount of change at either end of the Value range doesn't correspond to the same number of units, so you end up with very few distinct values where your eyes require a lot more for a smooth appearance. Since "Invert" is the equivalent of a downwards diagonal in Curves, it could be replaced by an inverted gamma curve.

_________________
Image


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 10:08 am  (#11) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
There is no fault with the filter as far as I can see, it's doing it's job correctly on the input image.

The problem is the JPEG "chunking" in the input image.
The JPEG compression limits the color variation in "chunks" without limiting luminosity dynamic range .. so any processing based on luminosity (such as Invert or luma invert) won't generally show up the inherent "chunking", but processing based on color values may well do.

This is a screenshot of part of the input image at 800% with curves adjusted:
Image
As you can see, the image is clearly divided into "chunks" of 8x8 pixels ..that's just the way the JPEG compression works.
The Value invert just makes the chunking more obvious.


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 10:15 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
thanks Ofnuts for the video and for the news concerning the next release of Gimp
so far, as a simple user, probably I will switch to the luma invert filter for enhancing my photos

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 10:17 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
thanks jontait for the detailed explanation
do you consider my (possible) decision to use for the future the luma invert instead of the value invert a good one or a bad one?

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 10:38 am  (#14) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
Looks okay to me, Dinasset. And it probably is better for low RGB values than the standard Value invert (as the author commented).


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 10:39 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
thanks!

_________________
"Where am I ?"


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 5:01 pm  (#16) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
The following is from the PDB entry for plug-in-vinvert.
Note the sentence: Sometimes produces unpleasant color artifacts on images from lossy sources (ie. JPEG).
This function takes an indexed/RGB image and
inverts its 'value' in HSV space.  The upshot of
this is that the color and saturation at any given
point remains the same, but its brightness is
effectively inverted.  Quite strange.  Sometimes
produces unpleasant color artifacts on images from
lossy sources (ie. JPEG).
Adam D. Moss ([email protected])
Mukund Sivaraman <[email protected]>
Adam D. Moss ([email protected])
Mukund Sivaraman <[email protected]>
27th March 1997
12th June 2006


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 5:26 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12845
I use to use Value Invert a lot, but I now prefer Luminosity Invert.

http://registry.gimp.org/node/8352

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 6:13 pm  (#18) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
Hmm..
That's actually the same script that Dinasset found, but with a different name and slightly different format!

At http://stratadrake.deviantart.com/art/G ... n-86515731
Filename: GIMP_YCC_Inversion_by_Stratadrake-1.scm

At http://registry.gimp.org/node/8352
Filename: invert-YUV.scm


Top
 Post subject: Re: value invert
PostPosted: Mon Apr 13, 2015 7:07 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12845
Yeah; in the Color Drop down menu, it's called Luma Invert. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: value invert
PostPosted: Tue Apr 14, 2015 4:58 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
just playing with the luma_invert possibilities
it seems that the plug-in "recompose" does not work when in the "decompose" phase it has been selected one of the two YCC options suffixed 256
"YCbCr_ITU_R709_256"
"YCbCr_ITU_R470_256"

while it works when in the "decompose" phase it has been selected one of the other two YCC options without the suffis 256, id est:
"YCbCr_ITU_R709"
"YCbCr_ITU_R470"


maybe jontait is able to explain this to me (or there is really a problem/limitation in the "recompose" plug-in

(I was just trying to extend the script for luma-invert to all 4 possibilitioes)

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group