Convert xlsx to jpg

Hello everyone,
I work on a project matlab for my company and i need help.
I want to know if it's possible on matlab to convert an xlsx file to image ?
if it's possibe, how can i do that.
Thank you!

Answers (1)

Yes. Try readmatrix
myImage = readmatrix('my image.xlsx');
imshow(myImage);
If that doesn't work, try xlsread() or attach your workbook.

5 Comments

thank you for answer.
it's okay, but if i want for example to display the image in color, xlsread() does it automatically ?
Because i just have a grey image, and in my excel file i have color.
and is it possible, to display the values ​​of R, G and B in any position on the image and save them ?
You'd have to extract the R, G, and B parts of the matrix and then combine them. Like let's say the R, G, and B images were side by side in your workbook. Then you'd do
[rows, columns] = size(myImage);
columns1 = columns/3;
r = myImage(:, 1:columns1);
g = myImage(:, columns1 + 1 : 2*columns1);
b = myImage(:, 2*columns1+1:end);
rgbImage = uint8(cat(3, r, g, b)); % Or uint16 whatever you're using.
but if i want to dispaly them on the image ? or the terminal ?
Hello everyone,
In my picture i want to display the values of : R, G, and B.
When i have my picture, i want to display theses values maybe on the picture or on the terminal
Can someone help me ?
Thanks!
right after you call imshow(), call impixelinfo()
hp = impixelinfo;
If you want to reposition it, you can use
hp.Units = 'normalized';
hp.Position = [x, y, .2, .03]; % All values in the range 0-1.

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Tags

Asked:

on 26 Jun 2020

Commented:

on 29 Jun 2020

Community Treasure Hunt

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

Start Hunting!