k, I think you have an old version.  My code from a fresh cvs update
looks like this.  I ran into this in the past as well, and ended up
fixing it (if you can call it that) with the same idea you suggested.

        imlib_save_image_with_error_return(tmpfile, &err);
        evas_image_cache_flush(evas_object_evas_get(im->obj));
        switch (err)
        {
              case 0: 
                 unlink(im->filename);
                 if (!rename(tmpfile, im->filename))
                    result = 1;
                 break;
              default:
                 fprintf(stderr, "Unable to save file(%d)", (int) err);
                 break;
        }

Considering .JPG files pop up every so often maybe some concession needs
to be made in order to support them better.  Tho the default saver is
.jpg iirc.  


On Tue, 2004-05-11 at 03:26, Stafford Horne wrote:
> Hello, 
> 
>    I don't seem to be able to connect to the CVS server right now so I
> can't easily make a patch.  But I can explain. 
> 
>    When trying to save changes to an image in Entice if there is an
> error during saving the image will be deleted. Thats not very good. 
> 
> Here is what we need to to.
> 
> in the 
>   file image.c
>   function entice_image_save
> 
> this line. 
> unlink(im->filename);
>  
> Should be moved into the case statement.  That way we only delete the
> image if we were able to create the temporary image. 
> 
> You know what I mean??
> 
> As for the cause of this Error in the first place. This I am guessing is
> because:
>  
> if ((tmp = strrchr(im->filename, '.')))
>    imlib_image_set_format(tmp + 1);
> 
> is used for the image format stuff, so i am guessing my file had a bad
> file extension (JPG) and there was an error saving.  I am not to sure
> what imlib_image_set_format supports. so I am not going to try and fix
> it because I can't even download the imlib2 source right now. 
> 
> Stafford
> 
-- 
Corey Donohoe
http://www.atmos.org/




-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to