HELP MEEE !!!!!!!!!! HOW TO SAVE THE LOADED IMAGE !!!!



HAI FRIENDS,
I HAVE CREATED AN IMAGE VIEWER WITH GTK2..
I COULD LOAD AN IMAGE..WITH FILE OPEN..

BUT, HOW CAN I SAVE THE SAME IMAGE TO A PARTICULAR
DIR???
PLS I NEED CODINX A LG FOR IT...
CHECK IS THIS CODING WRITE?
========================================================================
void ok_button_pressed_save(GtkWidget *widget,
gpointer data){
  
char *tempp;
  int length;
 
tempp=gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesave));
  length=strlen(tempp);

  
  
}

void display_filesaveAs(GtkWidget *widget,gpointer
data){
  
  filesave=gtk_file_selection_new("Save");
 
//gtk_file_selection_complete(GTK_FILE_SELECTION(filesave),"*.*");
 
gtk_window_set_position(GTK_WINDOW(filesave),GTK_WIN_POS_CENTER);
  gtk_widget_show(filesave);

 
gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(filesave)->ok_button),"clicked",GTK_SIGNAL_FUNC(ok_button_pressed_save),data);

 
gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesave)->ok_button),"clicked",GTK_SIGNAL_FUNC(gtk_widget_destroy),GTK_OBJECT(filesave));
 
gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesave)->cancel_button),"clicked",GTK_SIGNAL_FUNC(gtk_widget_destroy),GTK_OBJECT(filesave));
   
  
}
====================================================================================================================================================================
OR I HAVE TO USE 
tempp=gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesave));

instead of 'set'...
pls i need ur help...HELP ME ...

THANX A LOT!!



__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]