Image array as ImageSource for uiimage result in high jpg compression?
Show older comments
I am doing some image processing on a image for a app. I have encountered a problem that the image shown by uiimage is low quality (maybe jpeg compression). The code example below shows two ways of displaying the same image with uiimage with two different results (right low quality, left normal).
Can i do something to stop the quality/compression ?
f = uifigure('Position',[20 20 440 210]);
im = uiimage(f,'Position',[10 10 200 200]);
im2 = uiimage(f,'Position',[230 10 200 200]);
imloadet = imread('membrane.png');
im.ImageSource = 'membrane.png';
im2.ImageSource = imloadet;

Thanks in advance for the help
3 Comments
Johan C
on 9 Nov 2020
Frans Muller
on 16 Nov 2020
Edited: Frans Muller
on 16 Nov 2020
same problem here i put on a color gradient, and it suffered similar compression or scaling issues distorting the gradient. in the end i made the image 2.25 larger then the pixels i needed the img to be and the scaling issue was less, but not gone. could it be something to do with the extend of windows magnification (display settings).
setting fit,stretch and scale options did not impact the issue. putting a 950 wide image ( same color in the whole column) in a uiimage 460 wide made a difference, but did not resolve it.
Johan C
on 17 Nov 2020
Accepted Answer
More Answers (0)
Categories
Find more on White in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!