clear all
close all
clc

img = imread('cameraman.tif');
imwrite(img, 'cameraman.jpg', 'Quality', 100);


%% Bloc processing

%%Bloc selection
%[x,y] = ginput(..);

%%Bloc compression
%bloc_quantif = jpeg_compress(...);

%%Bloc display


%% Full image

%%Use of blkproc
%Ic = ...;



%%Save in .jpg without compression
%imwrite(..., ..., 'Quality', 100);
%tmp = imfinfo(...); 
%size_init = tmp.FileSize; %in bytes 


%% Evaluation

psnr_val = zeros(1,99);
entropy_val = zeros(1,99);

factor_val = zeros(1,99);
ratio_val = zeros(1,99);

%%Loop over quality factor
for q=1:99

    disp(q);
    %%Apply compression
    
    
    %%Mesure PSNR and entropy
    %psnr_val(q)    = ...;
    %entropy_val(q) = ...;
    
    %%Save image
    
    %%Get size information

    %%Mesure Factor and Ratio
    %factor_val(q) = ...;
    %ratio_val(q)  = ...;
    
    
end

%%Display results

