Code covered by the BSD License  

Highlights from
im2html.m

image thumbnail

im2html.m

by

 

Convert image pixels to HTML table showing pixel colors and values

se.utils.rgbToHtmlHex(rgb)
function s = rgbToHtmlHex(rgb)
%rgbToHtmlHex Convert RGB triple to HTML hex string

%   Steve Eddins
%   Copyright 2011 The MathWorks, Inc.

rgb = rgb(:)';
rgb = im2uint8(rgb);
s = dec2hex(rgb, 2)';
s = ['#' s(:)'];

Contact us