How to include an image with original resolution in a Live Script?

108 ビュー (過去 30 日間)
Carlo Monjaraz
Carlo Monjaraz 2017 年 7 月 13 日
コメント済み: Ricardo 2022 年 12 月 17 日
I am creating an exercise for a course with a Live Script in Matlab 2016a.
I made some PNG drawings with free body diagrams. Unfortunately when they are inserted the Live Script, the image quality is dramatically decreased, making the text in the images very difficult to read. I tried also TIFF and JPEG with the same results.
Is there a way to include an image in a Live Script with the original quality and resolution?
Where can I suggest the addition of support for SVG or some format that support vector images?
Thank you.
  4 件のコメント
Daniel Alazard
Daniel Alazard 2020 年 10 月 9 日
Hi,
I have the same probem and I saw that there is no answer from Matlworks...
Hope they could help up to solve this problem
Daniel
Axel Jacobsen
Axel Jacobsen 2021 年 1 月 29 日
Hi!
This may be a bit late, but I found imshowing an imread worked at full resolution:
imshow(imread("qrd_xfer.png"))

サインインしてコメントする。

採用された回答

Martin Knelleken
Martin Knelleken 2021 年 3 月 2 日
編集済み: Martin Knelleken 2021 年 3 月 3 日
Hi,
I'm very sorry for the delayed answer. I noticed this post only recently.
Regarding the quality loss of images: We are aware of that problem and we're aktively working on a solution. It's caused by a certain library we're using for loading images from disk. It has limits for the image size and the resize algorithm is poor.
Again, this affects only reading images from disk. It does not happen when you paste the image into the Live Script. Thus, if you have the chance to open the original image in another application (e.g. Paint on Windows, or Preview on Mac), you can copy it there and then paste in MATLAB. That should preserve the original solution.
Btw, MATLAB Online does not have that limitation. Just in case you're using it.
Regarding SVG support: We're working on that, too. Stay tuned.
Thank you for using the Live Editor and your feedback!
Kind regards
- Martin
  2 件のコメント
Carlo Monjaraz
Carlo Monjaraz 2021 年 3 月 3 日
Thank you Martin for your answer. It is appreciated.
Ricardo
Ricardo 2022 年 12 月 17 日
Thank you for the answer. And +1 on thew fix and more so for the svg support! Hopefully this comes with better support for exporting with transparency as well.

サインインしてコメントする。

その他の回答 (1 件)

Math Works
Math Works 2022 年 7 月 23 日
so? still not fixed?
  2 件のコメント
Martin Knelleken
Martin Knelleken 2022 年 7 月 28 日
Unfortunately not.
The fix needs some other changes which turned out to take longer than expected. It's still in progress.
So, sorry for the delay and inconveniences.
Kind regards
- Martin
Alex Morgan
Alex Morgan 2022 年 7 月 28 日
In the meantime, I would use Python if you have the image files saved, it is fairly simple even if you don't know it

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeScripts についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by