It is currently Wed Dec 13, 2017 9:30 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Sun Jun 30, 2013 4:33 pm  (#1) 
Offline
New Member

Joined: Jun 30, 2013
Posts: 4
I just installed G'Mic a couple of days ago, and it's absolutely great and can produce some amazing results. But there is a problem that happens sometimes that doesn't make sense, and that is when hitting the Apply button to process an image, the result sometimes comes out looking nothing like what was in the preview display window. I've experienced this problem in several different filters, and yet, it isn't consistent in that I've used those same filters on other images and there was no problem. It seems to me that the exact same processing should be used for the preview window and the user's picture and there should be no differences. Why does it do this? How can it be made to stop? Or is this a known bug that still needs to be fixed?

I had wasted time doing a couple of screen captures (in this case the Pencil filter on a Mac with Mountain Lion) and putting them together so I could upload and show exactly the problem, only to be told after I registered for this forum, I'm not allowed to post links to images until after making 5 posts, putting an artificial manmade roadblock in my way of visually communicating the issue.


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: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Sun Jun 30, 2013 4:38 pm  (#2) 
Offline
GimpChat Member

Joined: May 16, 2010
Posts: 13984
Location: USA
Elhardt wrote:
I just installed G'Mic a couple of days ago, and it's absolutely great and can produce some amazing results. But there is a problem that happens sometimes that doesn't make sense, and that is when hitting the Apply button to process an image, the result sometimes comes out looking nothing like what was in the preview display window. I've experienced this problem in several different filters, and yet, it isn't consistent in that I've used those same filters on other images and there was no problem. It seems to me that the exact same processing should be used for the preview window and the user's picture and there should be no differences. Why does it do this? How can it be made to stop? Or is this a known bug that still needs to be fixed?

I had wasted time doing a couple of screen captures (in this case the Pencil filter on a Mac with Mountain Lion) and putting them together so I could upload and show exactly the problem, only to be told after I registered for this forum, I'm not allowed to post links to images until after making 5 posts, putting an artificial manmade roadblock in my way of visually communicating the issue.


5 posts really isn't all that many and you would be surprised as to how much spam is blocked because of this rule.

The only way to get (close to) exact results is to use smaller images.Keeping the preview window at 100% will usually keep the results close.G'MIC normally opens an image at 100% so don't render with the image zoomed in or out, and you should be okay. :)


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Sun Jun 30, 2013 4:40 pm  (#3) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5207
Location: Gimpville
We have anti-spam measures in place for new members. If you would like to add an image to your post, please send a link to the images to any staff member and we will add the images to your post.

You can use a free site like: http://imagesup.net/

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Sun Jun 30, 2013 4:41 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1620
There have been lot of discussion about this issue. What you should know is :

- Having an accurate preview for some filters is almost impossible, as the effect is estimated from either a rescaled version of the image, or a crop of the image. Sometimes, there are no ways you can compute what a filter will render with these two choices.
- Also, never try to change the preview zoom factor ! The computed preview will be likely very different from what you see on the preview.


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Sun Jun 30, 2013 5:35 pm  (#5) 
Offline
New Member

Joined: Jun 30, 2013
Posts: 4
Just now I went back and followed the advice of not changing the default preview zoom factor. Turns out I've rarely changed it anyway. But the default preview zoom factor for Pencil is already zoomed up such that the cropped portion of your image that shows up in the preview window matches the size pixel for pixel of that portion in your full image. So in the case of the Pencil filter, you need to zoom out before using it, but not all the way out, as that's not accurate either. I also tried a different image and while it also differed from that in the default sized preview window, it didn't differ as much. So image content seems to also affect it.

As for 5 posts not being much, that depends. I'd have no problem making 5 posts if I could post pictures of some of my GMIC experiments that used multiple filters and merged them in various ways to achieve some pretty good results. But short of that, I'll have to encounter and report on 5 GMIC problems/bugs until I can get to that point.


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Sun Jun 30, 2013 5:51 pm  (#6) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 273
Location: Scotland
This question does pop up a lot. Mainly it's down to each filter maker to do what they can, but many times it's just not possible to make a preview match the full image due to the calculation being used. And of course if the preview uses a larger image it becomes slow and is no advantage over just applying it to the final image!

@Ronounours: How about passing the input image width/height to scripts as global gmic vars? Perhaps given that info some filters could render a more accurate preview? That way nothing existing breaks but you can get the dimensions if you want.


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Sun Jun 30, 2013 5:54 pm  (#7) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5207
Location: Gimpville
Elhardt wrote:
As for 5 posts not being much, that depends. I'd have no problem making 5 posts if I could post pictures of some of my GMIC experiments that used multiple filters and merged them in various ways to achieve some pretty good results. But short of that, I'll have to encounter and report on 5 GMIC problems/bugs until I can get to that point.

We have an introduction forum. Feel free to say hello there to bump up your post count.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Mon Jul 01, 2013 2:23 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1620
garagecoder wrote:
@Ronounours: How about passing the input image width/height to scripts as global gmic vars? Perhaps given that info some filters could render a more accurate preview? That way nothing existing breaks but you can get the dimensions if you want.


Well, from my point of view, I think that most of the inaccurate previews are not caused by the fact that the image dimensions are not those of the final image (after all, the ratio is preserved, and it often suffices in making things easier), but rather by the fact that some of the image statistics are not preserved in what the preview widget gives as a thumbnail.
Particularly, the real min and max values are lost, for any zoom factor. The min and max of the gradient norms are also important features that are missing.

So, of course, I could pass all those values as global variables so that the preview commands can try to do a better job, but I don't think this is a good idea at all, because :

- You probably don't want to write a version of your filter specific to the preview, considering these extra variables (it will probably requires some changes in the code compared to the original filter, and I doubt many people will have the motivation to do it).
- You will probably need (one day) some extra variable linked to a particular image characteristic that we didn't think about, and thus you will ask for a new extra variable, and you will have to wait for a new version, and probably you will abandon the idea of doing a better preview :)
- For most of the filters, those extra variables will be useless, but still will take time to compute (and as they will be computed from the full-size image, it can take some time !).
- You will need to add those extra variables not only for the GIMP plug-in, but also for other interfaces of G'MIC (Zart, G'MICol, and maybe future Krita integration). I wouldn't like to be responsible of breaking all these interfaces because the extra variables are not defined (of course, you could check if they are defined in your preview command, but this becomes a bit ugly).

Note that on the other hand, there are simple rules that can be respected to enhance the preview rendering. The most important one to me is to avoid at any price the mixing of 'global' and 'local' features of the image for a filter to compute. When someone codes a new filter, he should have an idea on which scale (zooming factor) is the best to get an accurate preview, and then decides the meaning of the parameters regarding the scale he chose.
For instance, a lot of filters define some 'smoothness' parameter, used practically as the argument of a '-blur' function internally used. Depending on the 'best' preview scale, it could be better to call '-blur' with '$1' (for a local scale) or '$1%' (for a global scale). A lot of G'MIC commands accept '%' arguments, and this is very useful to use them when possible, to make a better preview (but not only of course).


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Mon Jul 01, 2013 3:57 am  (#9) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 273
Location: Scotland
Thanks, I can see you gave it a lot more thought than me! And you're right that most of the filters with poor preview could do better without extra vars, so really adding them isn't going to help if they don't bother to update anyway...

I already try to use percentages where possible in my own filters to keep the scaling nice, but sometimes there's simply nothing you can do (even if you did know the original dimensions!). But filters can also use tick boxes for different types of scaling, plus you can detect if you're inside the preview and base the output on that.


Top
 Post subject: Re: G'MIC Processed Image Doesn't Match Preview Image
PostPosted: Tue Nov 21, 2017 1:10 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2210
Location: Retired Moderator Slowly Returning to the Living.
This is not a G'Mic issue or even a Gimp issue. I have seen it with PS (years ago) and currently see it on many Android based apps. It's just a factor of applying filters to raster based images.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Layer to Image Size doesn't work

2

No new posts Font Preview Image Question

5

No new posts Attachment(s) Zoom borders/corners of image (point outside of image)

8

No new posts Attachment(s) Error -----GIMP XCF image plug-In could not open image

14

No new posts Attachment(s) Help explaining changing DPI in IMAGE>SCALE IMAGE [SOLVED]

6



* Login  



Powered by phpBB3 © phpBB Group