I have worked on a function (applyhatch_plusC) which has been on the file exchange now for 15years. Recently, the functionality fails.
What seems to be the issue is the print(gcf,'-RGBimage') does not behave as before, and appears to be doing some internal dithering that I can't seem to turn off. In previous MatLab versions, even back to <2011 with the funtion hardcopy, an RGB copy of a figure (say, containing a red, green, and blue object) would output a cdata matrix of the image, with 5 unique colores (rgb and b&w). I do the same thing now, on the same image, and I get a whole slew of shades, maybe occuring on a few dozen pixels only.
Now, as my work exploits the unique colors to convert 1 color to soemthing else, this no longer works. hardcopy no longe exists, and I don't see how to get print(gcf,'-RGBimage') to accept options. I would like to avoid passing through a temp file, as this requires write access and isn't very elegant.
This is rather frustrating, as this undocumented MatLab change ruins a nice little function that's been download thousands of times...
9 Comments
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_603693
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_603693
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_604296
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_604296
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_745902
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_745902
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_745939
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_745939
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_747024
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_747024
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1160098
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1160098
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1161843
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1161843
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1161878
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1161878
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1161928
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/416341-output-of-rgbimage-seems-to-have-changed-any-help#comment_1161928
Sign in to comment.