Bug 30950

Summary: gimp-fix-ca: updated several files so that it builds with current version of Mageia
Product: Mageia Reporter: Joe Da Silva <digital>
Component: RPM PackagesAssignee: Stig-Ørjan Smelror <smelror>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Normal CC: eatdirt, marja11, matteo.pasotti, rverschelde, smelror
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/JoesCat/gimp-fix-ca
Whiteboard:
Source RPM: CVE:
Status comment:

Description Joe Da Silva 2022-10-09 23:56:58 CEST
Description of problem:
This is similar to bug #30931 where the home page suggested fix-CA as a helper program for gimp-plugin-astronomy. Seeing from other web searches having issues with building fix-ca.c, I repeated the autoconf/automake configure/make based on the build system added to gimp-plugin-astronomy seen in #30931.
I already tried contacting upstream with suggested patches but the home website https://kcd.sourceforge.net/fix-ca.php has no activity and I received no reply from the website author contact.

Version 3.03 is intentially/basically v3.0.2 with an autoconf/automake.
There appears potential to improve the fix-ca program further, and many API calls can be updated, but this is a good starting point. https://github.com/JoesCat/gimp-fix-ca

How reproducible:
Build fine with Mageia8, 32bit, and gimp 2.10. filter Menu gains additional "Filter->Colors->Chromatic Aberration" menu.
Also included rpm spec file, however, I see you added a better rpm spec file for gimp-plugin-astronomy

Steps to Reproduce (from source at https://github.com/JoesCat/gimp-fix-ca )
1. autoreconf -i
2. automake
3. ./configure
4. make dist
At this point you hav a tar.gz file, a spec file, and the dist file holds the website example pictures too (not installed).
Comment 1 Lewis Smith 2022-10-13 22:03:34 CEST
Joe, can you please say what this about? What Gimp plugin package it relates to? Why it matters to Mageia?

We apparently have in Cauldron (from urpmq -y gimp-plugin):
 gimp-plugin-animstack
 gimp-plugin-astronomy
 gimp-plugin-bgmask
 gimp-plugin-gmic
but the SRPM list (maintDB) shows in addition:
 gimp-plugin-bimp
 gimp-plugin-registry
 gimp-plugin-separate
 gimp-plugin-wavelet-decompose
 gimp-plugin-wavelet-denoise

Looking at M8 shows just (Sophie):
 gimp-plugin-animstack-0.5-9.mga8.src.rpm
 gimp-plugin-bgmask-0.1-9.mga8.src.rpm 
but this is confusing; I need to look from my M8 system. I am sure we had affair with the 'wavelet' plugins.

CC: (none) => lewyssmith

Comment 2 Joe Da Silva 2022-10-16 06:04:56 CEST
Hi Lewis,
Fix-CA would be of interest to users of gimp-plugin-astronomy and is also one of three suggested plugins on the non-active home site: http://www.hennigbuam.de/georg/gimp.html

Most people don't know what it is, but it is a property of optics, lenses, glass (and other optical material including air change in density/mass). For example, when you shine white light and bend it through a prism, the white light splits noticeably into the various color spectrum. Searching around, I found a video that might help: https://www.youtube.com/watch?v=oE8Zjr5NJrM
This is Lateral chromatic aberration (lenses).

Astronomy is all about optics and stretching the limits of what you can get from telescopes, lenses, and cameras. An average family taking a family photo at the beach using a generic camera is not going to notice or care much about this problem (bright light, relatively close-up, majority of photo is people, and the camera may also have some self-corrective software), but for an astronomer trying to get the best information out of a few pixels, then this becomes more important, or photographers using other lenses instead of the usual recommended lenses that may come with that type of camera.

I checked around a little for other possible substitutes under definitions like chromatic, or color correction (example: gmic - appears to do directional), but I didn't see something similar that could fix lateral. It might exist, maybe under another name or definition?

Doing a search for fix-ca: https://www.google.com/search?client=firefox-b-e&q=gimp-fix-ca there are references going back to gimp-plugin-astronomy, example first page: https://www.cloudynights.com/topic/607678-easy-chromatic-aberration-fix-in-gimp/ and other webpages with similar hits. I did find this rather interesting article, which is not astronomy, but is panoramic related: https://community.theta360.guide/t/guide-removing-tripod-fringing-or-ca-on-theta-images-in-gimp2-8/832 with example picture at approx "Check this Panorama"

The other chromatic aberration, is directional, which seems to be shifting the colors sideways across the entire photo (lateral changes more towards the edges). This would be due to looking through thick glass windows, aquariums, and other parallel plates. This can also be used for trippy/groovy pictures which is opposite of fixing/correcting. gimp gmic appears to have this directional chromatic aberration fix.

Looking at the other two links on http://www.hennigbuam.de/georg/gimp.html, "Exposure Blend" goes to a dead link, and "Purple Fringe Fix", also another old program. "Purple Fringe" appears to have a better solution: https://www.gimpusers.com/forums/gimp-developer/14646-purple-fringing-removal-extension which appears to be already added to gimp gmic (see readme here https://github.com/mjambon/purple-fringe ).

Hopefully, the above helps explain fix-ca as potentially an old tool being re-introduced back into the gimp plugin toolkit. Many of the plugins have different licenses compared to gimp, so they have to remain as plugins and are unlikely going to be merged into gimp or gegl.

Reading your list above, I see missing from the list gimp-fourier-plugin, which is bug#30764 - which started here: https://ml.mageia.org/l/arc/dev/2022-07/msg00246.html

Reading the second-half of your question.....
but the SRPM list (maintDB) shows in addition:
 gimp-plugin-bimp
 gimp-plugin-registry
 gimp-plugin-separate
 gimp-plugin-wavelet-decompose
 gimp-plugin-wavelet-denoise

Looking at M8 shows just (Sophie):
 gimp-plugin-animstack-0.5-9.mga8.src.rpm
 gimp-plugin-bgmask-0.1-9.mga8.src.rpm 
but this is confusing; I need to look from my M8 system. I am sure we had affair with the 'wavelet' plugins.

....several of the plugins have not seen updates in a while. Some have trouble with building/compiling - if this is what you see too, point me to something that looks like it needs help.
Comment 3 Lewis Smith 2022-10-16 21:32:11 CEST
Thank you for this wealth of detail, which none-the-less baffles me.

I am posting on the dev mailList for some +ve reaction, & CC'ing Stig who now nurses Gimp. En attente.

CC: (none) => smelror

Comment 4 Marja Van Waes 2022-10-20 14:56:10 CEST
(In reply to Lewis Smith from comment #3)
> Thank you for this wealth of detail, which none-the-less baffles me.
> 
> I am posting on the dev mailList for some +ve reaction, & CC'ing Stig who
> now nurses Gimp. En attente.

I'm baffled, too ;-)

Also CC'ing akien, eatdirt and pasmatt because they maintain some of the gimp plugins, in case they haven't seen the message on dev ml

CC: (none) => eatdirt, marja11, matteo.pasotti, rverschelde

Comment 5 Joe Da Silva 2022-10-21 05:15:16 CEST
> I'm baffled, too ;-)

np. The logic is in the science.

> Also CC'ing akien, eatdirt and pasmatt because they maintain some of the gimp
> plugins, in case they haven't seen the message on dev ml

Understandable. Lewis invited me earlier to the opportunity (Bug 30092), but
the dev mailing list is far too busy for me. I'd be going through one email
message and another 10 appear waiting. Pretty fast-n-furious, almost
competitive with the ffmpeg list. It's just too busy for me. Easier for me
to work upstream at a pace I can handle. Got some free time now.

Looking at gimp plugins, they seem relatively fix-n-repeat with similar fixes,
so if you figure a recipe for one, it can be repeated with other plugins.

Looking at the given list:
 gimp-plugin-bimp
     this would need a bit of work due to scripting qualities.
 gimp-plugin-registry
     very abandoned, easier to pick projects out of it and find the upstream
     sources, work with each of those preferably.
 gimp-plugin-separate
     author saw some limitations and moved to newer project cmybtool
     separate now is separate+, looks like 0.58 or 0.59beta
 gimp-plugin-wavelet-decompose
 gimp-plugin-wavelet-denoise
     both of these are active, and best to work with those upstreams.
Comment 6 Lewis Smith 2022-10-21 10:16:09 CEST
> the dev mailing list is far too busy for me
Joe, we were not advising you to subscribe to the dev mailList, only saying that posting this bug there might provide some help. It has to land up with the packagers. So far, it has been unanswered, but they are extremely busy.
Comment 7 Chris Denice 2022-10-23 21:12:16 CEST
Hi,
I imported gimp-astronomy a while ago when only a few linux tools were available for that. I don't think it is maintained, so feel free to drop it if that causes too much troubles.
Now, we have "iraf" and python-astropy on mageia, and we could import others such as siril. I don't think gimp-astronomy is of such a use these days!

Cheers,
Chris.
Comment 8 Joe Da Silva 2022-10-24 00:39:06 CEST
Thanks for the FYI Chris - much appreciated.
Me, not knowing much about the hobby, I mentioned bringing gimp-astronomy back to life to a co-worker who is very-much into this hobby, maybe I'll get some stacks to test-out the plugin (city lights wash-out much of the sky here), but also pointed me to a recent URL with some other programs out there too, some for pay, others free. Reading this, you might want to add Kstars to the list: https://www.highpointscientific.com/astronomy-hub/post/astro-photography-guides/best-software-for-astrophotography-in-2022 https://edu.kde.org/kstars/
No harm done, there were some good things learnt in bringing gimp-astronomy back to life, particularly about the way to connect to the gimp library vs my earlier try with the fourier plugin.
You're probably right about "these days", however, if you don't mind letting it ride on Mageia9, we could see where it goes.

Hi Lewis, no worries, it was just my point of view :-)

In terms of fix-CA, I could experiment a little with some old analog kodak style prints from an old camera we had. I'm pretty sure there was no digital correction back in them old days :-) Looking at the code, it appears 8bit at the moment and could be improved for Gegl. Goat exercise https://www.reddit.com/r/GIMP/comments/8sar0c/can_someone_please_tell_me_what_goatexercise_is_xd/
Comment 9 Chris Denice 2022-10-25 07:58:02 CEST
Oh yes, if gimp-astronomy can stay, I'd be happy about that! Thanks a lot (kstars rocks indeed!).
Comment 10 Lewis Smith 2022-10-31 17:46:09 CET
I am still unsure what is being asked. Is it that we [re]introduce 'gimp-fix-ca' into Mageia 9 using Joe's work comment 0?

And I am still flumoxed by the different gimp plugin collections. Can you shed some light, Chris?

From Sophie (plugins only):
gimp-plugin-animstack-0.5-9.mga8.src.rpm
gimp-plugin-bgmask-0.1-9.mga8.src.rpm
------------------------------------
gimp-fourier-plugin-0.4.4-1.mga9.src.rpm
gimp-plugin-animstack-0.5-10.mga9.src.rpm
gimp-plugin-astronomy-0.11-1.mga9.src.rpm
gimp-plugin-bgmask-0.1-10.mga9.src.rpm
--------------------------------------

MaintDB:
 gimp-plugin-bimp
 gimp-plugin-registry
 gimp-plugin-separate
 gimp-plugin-wavelet-decompose
 gimp-plugin-wavelet-denoise

Cauldron:
$ urpmq -y gimp-plugin
gimp-plugin-animstack
gimp-plugin-astronomy
gimp-plugin-bgmask
gimp-plugin-gmic
+ gimp-fourier-plugin

Does this bug become a 'new package request' for 'gimp-fix-ca'?
Comment 11 Lewis Smith 2022-11-01 08:17:07 CET
[continued]
Mageia 8:
$ urpmq -y gimp-plugin
gimp-plugin-animstack
gimp-plugin-bgmask
gimp-plugin-gmic
 NO gimp-fourier-plugin
Comment 12 Lewis Smith 2023-06-04 21:32:47 CEST
This has been hanging around awaiting clarification about exactly what is wanted or proposed.

Assigning to Stig who currently updates Gimp. Perhaps you can see something which can be done. Ask on devML? Close 'wontfix' (cannot fix) if nothing can.

Assignee: bugsquad => smelror
CC: lewyssmith => (none)

Comment 13 Joe Da Silva 2024-03-01 01:39:18 CET
Just released an updated 4.0

gimp-fix-ca now upgraded to use gimp-2.10, with colour precision of 8/16/32bit or double per RGB/RGBA colour, a movable Lens X/Y, and more info in the README.
https://github.com/JoesCat/gimp-fix-ca/releasesgimp-fix-ca works okay on mageia8 32bit as well as tested okay on mageia9 64bit.
The example rpm spec file also builds okay without errors.

Looking at the code for gimp3, this requires a code-change to make this work in gimp3. code branch https://github.com/JoesCat/gimp-fix-ca/tree/test-gimp--2.99
contains a compilable, but not yet working gimp3-fix-ca

Bugs found along the way include:
gegl 0.4.49: https://gitlab.gnome.org/GNOME/gegl/-/issues/363 (open)
gimp 2.99.19: https://gitlab.gnome.org/GNOME/gimp/-/issues/10947 (resolved)
gimp 2.99.19 RC1: https://gitlab.gnome.org/GNOME/gimp/-/issues/10952 (open)

gimp-fix-ca is one of the suggested programs for colour correction mentioned on the old website: http://www.hennigbuam.de/georg/gimp.html