mirror of
https://github.com/kritiksoman/GIMP-ML
synced 2024-11-06 03:20:34 +00:00
13 lines
267 B
Mathematica
13 lines
267 B
Mathematica
|
function imgs = modcrop(imgs, modulo)
|
||
|
if size(imgs,3)==1
|
||
|
sz = size(imgs);
|
||
|
sz = sz - mod(sz, modulo);
|
||
|
imgs = imgs(1:sz(1), 1:sz(2));
|
||
|
else
|
||
|
tmpsz = size(imgs);
|
||
|
sz = tmpsz(1:2);
|
||
|
sz = sz - mod(sz, modulo);
|
||
|
imgs = imgs(1:sz(1), 1:sz(2),:);
|
||
|
end
|
||
|
|