GreycLab/gmic

Reverse Fourier Transform doesn't work for G'MIC installed as GIMP plugin

CalculonPrime opened this issue · 3 comments

To reproduce:

  • Install the G'MIC plugin in GIMP
  • Open GIMP, load an image. I used https://www.gimp.org/images/frontpage/wilber-big.png
  • Open the plugin dialog with Filters >> G'MIC-Qt...
  • Select Frequencies >> Fourier Transform and click OK to apply the forward transform, closing the plugin dialog. Note that the original image has been transformed.
  • Again, open the plugin dialog with Filters >> G'MIC-Qt... and then select Frequencies >> Fourier Transform and click OK. This will apply the transform again and close the dialog,

At the end of the above steps, the original image is not restored, so in fact the reverse FFT has not been applied correctly as the text instructions claim (they say "Note: Apply this filter once to get the direct FFT, and once again to get the reverse transform.").

Note that the above sequence succeeds in restoring the original image if you instead apply "Frequencies >> Fourier Transform [Old]", although the preview is invalid. (Should a separate bug be filed for the bad preview, or will bugs in the old version not be fixed?)

GIMP: 2.10.36
G'MIC: 3.3.3

I've tried the filter with your image, and it works for me (see attached mp4 video).
The filter generates two layers, so when you try to invert the transform, make sure the "Input Layer mode" is set to "All".

Video:
https://github.com/GreycLab/gmic/assets/10114565/be7f966f-63ef-4beb-9a3d-7d6bb6ceb079

OK, thanks. I could've sworn I tried adjusting that with no change but I guess not.

However, the preview in the old Fourier transform is still broken. Is that something too minor to worry about?

However, the preview in the old Fourier transform is still broken. Is that something too minor to worry about?

Yes, the preview is sometimes too small to get a correct preview with the "Old" version of the Fourier transform. Sometimes it works, sometimes not. The only thing I could do is just disabling the preview. Not sure this is better at the end.