jp1_add_sot.m
来自「用matlab实现的JPEG算法」· M 代码 · 共 26 行
M
26 行
% ------------------------------------------
% nom :
% [pos,pos_Psot] = jp1_add_SOT(fid,pos,num_tuile)
%
% ------------------------------------------
function [pos,pos_Psot] = jp1_add_SOT(fid,pos,num_tuile)
marker_SOT = hex2dec('FF90') ;
fseek(fid,pos,'bof');
fwrite(fid,marker_SOT,'uint16'); % Lsot
m_deb = ftell(fid) ;
fwrite(fid,9,'short'); % Lsot fixe
fwrite(fid,num_tuile,'uint16'); % Isot
pos_Psot = ftell(fid) ;
fwrite(fid,100,'uint32') ; % Psot provisoir
fwrite(fid,0,'uint8'); % =0 -> 1 tuile-part/tuile
m_fin= ftell(fid) ;
fseek(fid,m_deb,'bof');
fwrite(fid,(m_fin-m_deb),'short'); % Lsot
fseek(fid,m_fin,'bof');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?