From: Uyen Pham on 9 May 2010 07:40 Dear all, I have created a GUI which enables users to convert between image formats. I designed a button press named "Select images" where users can use to browse for multiple images to convert. And I also design a listbox where users can see which images they have chosen. 1. However, I don't know how to convert all info of the selected images chosen after users press "Select images" button to the listbox. Please help me with this. Here is my code: % --- Executes on button press in find. function find_Callback(hObject, eventdata, handles) % hObject handle to find (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Read the input image %Image formats %.bmp .gif.hdf.jpg.jp2.jpx.pbm.pcx.pgm.png.pnm.ppm.ras.tiff.xwd [files path] = uigetfile(... {'*.bmp;*.gif;*.hdf;*.jpg;*.jp2;*.jpx;*.pbm;*.pcx;*.pgm;*.png;*.pnm;*.ppm;*.ras;*.tiff;*.xwd',... 'All Image Files' },... 'Pick files','MultiSelect', 'on'); if ~files return; end Thank you very much for your help!
From: us on 9 May 2010 08:09 "Uyen Pham" <uyen_bunny(a)yahoo.com> wrote in message <hs66uk$7cl$1(a)fred.mathworks.com>... > Dear all, > I have created a GUI which enables users to convert between image formats. I designed a button press named "Select images" where users can use to browse for multiple images to convert. And I also design a listbox where users can see which images they have chosen. > > 1. However, I don't know how to convert all info of the selected images chosen after users press "Select images" button to the listbox. > > Please help me with this. > > Here is my code: > % --- Executes on button press in find. > function find_Callback(hObject, eventdata, handles) > % hObject handle to find (see GCBO) > % eventdata reserved - to be defined in a future version of MATLAB > % handles structure with handles and user data (see GUIDATA) > % Read the input image > > %Image formats > %.bmp .gif.hdf.jpg.jp2.jpx.pbm.pcx.pgm.png.pnm.ppm.ras.tiff.xwd > > [files path] = uigetfile(... > {'*.bmp;*.gif;*.hdf;*.jpg;*.jp2;*.jpx;*.pbm;*.pcx;*.pgm;*.png;*.pnm;*.ppm;*.ras;*.tiff;*.xwd',... > 'All Image Files' },... > 'Pick files','MultiSelect', 'on'); > if ~files > return; > end > > > Thank you very much for your help! a hint: - simply set the 'string' property of your listbox handle to [path,files] us
From: Uyen Pham on 9 May 2010 08:23 "us " <us(a)neurol.unizh.ch> wrote in message <hs68l0$oqa$1(a)fred.mathworks.com>... > "Uyen Pham" <uyen_bunny(a)yahoo.com> wrote in message <hs66uk$7cl$1(a)fred.mathworks.com>... > > Dear all, > > I have created a GUI which enables users to convert between image formats. I designed a button press named "Select images" where users can use to browse for multiple images to convert. And I also design a listbox where users can see which images they have chosen. > > > > 1. However, I don't know how to convert all info of the selected images chosen after users press "Select images" button to the listbox. > > > > Please help me with this. > > > > Here is my code: > > % --- Executes on button press in find. > > function find_Callback(hObject, eventdata, handles) > > % hObject handle to find (see GCBO) > > % eventdata reserved - to be defined in a future version of MATLAB > > % handles structure with handles and user data (see GUIDATA) > > % Read the input image > > > > %Image formats > > %.bmp .gif.hdf.jpg.jp2.jpx.pbm.pcx.pgm.png.pnm.ppm.ras.tiff.xwd > > > > [files path] = uigetfile(... > > {'*.bmp;*.gif;*.hdf;*.jpg;*.jp2;*.jpx;*.pbm;*.pcx;*.pgm;*.png;*.pnm;*.ppm;*.ras;*.tiff;*.xwd',... > > 'All Image Files' },... > > 'Pick files','MultiSelect', 'on'); > > if ~files > > return; > > end > > > > > > Thank you very much for your help! > > a hint: > - simply set the > 'string' property > of your listbox handle to > [path,files] > > us Thank you, us. But may be you misunderstand me. The list box is empty at first. When the users choose images from the "Select images" button and click Open. Then, the list box is updated with the info are the path and file names of the images. Anybody can help me???
From: us on 9 May 2010 08:31 "Uyen Pham" > > a hint: > > - simply set the > > 'string' property > > of your listbox handle to > > [path,files] > > > > us > > Thank you, us. But may be you misunderstand me. The list box is empty at first. When the users choose images from the "Select images" button and click Open. Then, the list box is updated with the info are the path and file names of the images. > > Anybody can help me??? i don't think i misunderstood you... the fact that the listbox control is empty does not matter at all... did you try to follow the instructions(?)... us
From: Uyen Pham on 9 May 2010 13:27 "us " <us(a)neurol.unizh.ch> wrote in message > i don't think i misunderstood you... > the fact that the listbox control is empty does not matter at all... > did you try to follow the instructions(?)... > > us Sorry us! Now, I understand what you mean. However, if I insert the code set(handles.listbox, 'String', [path, files]); into the code fragment of "Select images" button, when the users choose multiple images, in the listbox, it will show the path on the first line and then the names of the images next lines (because the images are in the same folder) How can I change my code so that every line in the listbox will show the full detail of an image, from its path to its name. Thank you very much for your helpful and urgent support!!!
|
Next
|
Last
Pages: 1 2 3 Prev: www.voguesneakers.com Cheap Jordan Shoes,Cheap Air Max Shoes Next: cosine transform |