In my GUI I've so many operations to perform on image. Including crop,_flip_,_resize_ etc., below code shows some of such functions. In my opening function i took the image from previous window
    function Pre_processing_OpeningFcn(hObject, eventdata, handles, varargin)
    handles.output = hObject;
    fname = getappdata(0, 'fname');
    axes(handles.axes1);
    imshow(fname);
    [path,name,ext,ver] = fileparts(fname);
    handles.fname = strcat(name,ext);
    [handles.queryx, handles.querymap] = imread(fname);
    guidata(hObject, handles);
For flip
    function Flip_H_Callback(hObject, eventdata, handles)
    a = getimage(handles.axes1);
     hflip = flipdim(a,2);
    axes(handles.axes1);
        imshow(hflip);
    guidata(hObject, handles);
For rotate
    function rotate_Callback(hObject, eventdata, handles)
    a = getimage(handles.axes1);
    Ra = get(handles.angle, 'string');
    Na = str2num(Ra);
    rotate = imrotate(a,Na);
    axes(handles.axes1);
    imshow(rotate);
    guidata(hObject, handles);
mages I'm using are of 8 bit depth and BMP format. why is this change?