langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
10
Task/Bitmap/Octave/bitmap-1.octave
Normal file
10
Task/Bitmap/Octave/bitmap-1.octave
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
im = zeros(W, H, 3, "uint8"); % create an RGB image of width W and height H
|
||||
% and intensity from 0 to 255; black (all zeros)
|
||||
im(:,:,1) = 255; % set R to 255
|
||||
im(:,:,2) = 100; % set G to 100
|
||||
im(:,:,3) = 155; % set B to 155
|
||||
im(floor(W/2), floor(H/2), :) = 0; % pixel in the center made black
|
||||
disp(im(floor(W/3), floor(H/3), :)) % display intensities of the pixel
|
||||
% at W/3, H/3
|
||||
p = im(40,40,:); % or just store it in the vector p, so that
|
||||
% p(1) is R, p(2) G and p(3) is B
|
||||
Loading…
Add table
Add a link
Reference in a new issue