from steganography in jpeg by karan anand
steganography in compressed images(jpeg),dc coeffs not touched

mat(varargin)
function varargout = mat(varargin)
% MAT M-file for mat.fig
%      MAT, by itself, creates a new MAT or raises the existing
%      singleton*.
%
%      H = MAT returns the handle to a new MAT or the handle to
%      the existing singleton*.
%
%      MAT('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MAT.M with the given input arguments.
%
%      MAT('Property','Value',...) creates a new MAT or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before mat_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to mat_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help mat

% Last Modified by GUIDE v2.5 27-Jun-2007 04:41:49

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @mat_OpeningFcn, ...
                   'gui_OutputFcn',  @mat_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before mat is made visible.
function mat_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to mat (see VARARGIN)

% Choose default command line output for mat
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes mat wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = mat_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in load.
function load_Callback(hObject, eventdata, handles)
% hObject    handle to load (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global var
% Loading the Image
[filename, pathname, filterindex]=uigetfile( ...
    {'*.bmp','BMP File (*.bmp)'; ...
     '*.*','Any Image file (*.*)'}, ...
     'Pick an image file');
var=strcat(pathname,filename);
imshow(var);
guidata(hObject, handles);
% --- Executes on button press in pre.
function pre_Callback(hObject, eventdata, handles)
% hObject    handle to pre (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global n;
global var
n=prem(var);
set(handles.no, 'String', n);

% --- Executes on button press in enc.
function enc_Callback(hObject, eventdata, handles)
% hObject    handle to enc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global var;
global vart;
set(handles.status, 'String', 'processing');
done=encm(var,vart);
if done==1
    set(handles.status, 'String', 'done');
    arbit;
else
    set(handles.status, 'String', 'failed');
end

% --- Executes on button press in loadt.
function loadt_Callback(hObject, eventdata, handles)
% hObject    handle to loadt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global vart;
[filename, pathname, filterindex]=uigetfile( ...
    {'*.txt','TEXT File (*.txt)'; ...
     '*.*','Any Text file (*.*)'}, ...
     'Pick a text file');
     if(pathname~=0)
     vart= strcat(pathname,filename);
     end
     


% --- Executes on button press in post.
function post_Callback(hObject, eventdata, handles)
% hObject    handle to post (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global var
global snr
snr=post(var)
set(handles.sn, 'String', snr);

Contact us at files@mathworks.com