Logo Search packages:      
Sourcecode: adesklets version File versions

void imlib_save_image_with_error_return ( const char *  filename,
Imlib_Load_Error *  error_return 
)

Parameters:
filename The file name.
error_return The returned error.
Works the same way imlib_save_image() works, but will set the error_return to an error value if the save fails.

Definition at line 5128 of file imlib2.c.

{
   ImlibImage         *im;
   Imlib_Image         prev_ctxt_image;

   if (!ctx)
      ctx = imlib_context_new();
   CHECK_PARAM_POINTER("imlib_save_image_with_error_return", "image",
                       ctx->image);
   CHECK_PARAM_POINTER("imlib_save_image_with_error_return", "filename",
                       filename);
   CHECK_PARAM_POINTER("imlib_save_image_with_error_return", "error_return",
                       error_return);
   CAST_IMAGE(im, ctx->image);
   if ((!(im->data)) && (im->loader) && (im->loader->load))
      im->loader->load(im, NULL, 0, 1);
   if (!im->data)
      return;
   prev_ctxt_image = ctx->image;
   __imlib_SaveImage(im, filename, (ImlibProgressFunction) ctx->progress_func,
                     ctx->progress_granularity, error_return);
   ctx->image = prev_ctxt_image;
}


Generated by  Doxygen 1.6.0   Back to index