%% Write Image to Message
% Read an image.

image = imread('imageMap.png');

%
% Create a ROS image message. Specify the default encoding for the image. Write the image to the message.

msg = rosmessage('sensor_msgs/Image');
msg.Encoding = 'rgb8';
writeImage(msg,image);

% Copyright 2019 The MathWorks, Inc.
%