projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cw6 makefiles (makemac6.mcp)
[wxWidgets.git]
/
src
/
common
/
imaggif.cpp
diff --git
a/src/common/imaggif.cpp
b/src/common/imaggif.cpp
index 74e573df34173d361ac0f14d8891f24e64064aa2..e152a6cbda369817c9b710749e6abecc74602a00 100644
(file)
--- a/
src/common/imaggif.cpp
+++ b/
src/common/imaggif.cpp
@@
-44,6
+44,7
@@
bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
int error;
bool ok;
int error;
bool ok;
+// image->Destroy();
decod = new wxGIFDecoder(&stream, TRUE);
error = decod->ReadGIF();
decod = new wxGIFDecoder(&stream, TRUE);
error = decod->ReadGIF();
@@
-54,13
+55,13
@@
bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
switch (error)
{
case wxGIF_INVFORMAT:
switch (error)
{
case wxGIF_INVFORMAT:
- wxLogError(_("
wxGIFHandler
: error in GIF image format."));
+ wxLogError(_("
GIF
: error in GIF image format."));
break;
case wxGIF_MEMERR:
break;
case wxGIF_MEMERR:
- wxLogError(_("
wxGIFHandler
: not enough memory."));
+ wxLogError(_("
GIF
: not enough memory."));
break;
default:
break;
default:
- wxLogError(_("
wxGIFHandler
: unknown error!!!"));
+ wxLogError(_("
GIF
: unknown error!!!"));
break;
}
}
break;
}
}
@@
-70,14
+71,13
@@
bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
if ((error == wxGIF_TRUNCATED) && verbose)
{
if ((error == wxGIF_TRUNCATED) && verbose)
{
- wxLog
Warning(_("wxGIFHandler
: data stream seems to be truncated."));
+ wxLog
Error(_("GIF
: data stream seems to be truncated."));
/* go on; image data is OK */
}
/* go on; image data is OK */
}
- image->Destroy();
ok = decod->ConvertToImage(image);
ok = decod->ConvertToImage(image);
-
delete decod;
delete decod;
+
return ok;
}
return ok;
}
@@
-85,7
+85,7
@@
bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image),
wxOutputStream& WXUNUSED(stream), bool verbose )
{
if (verbose)
wxOutputStream& WXUNUSED(stream), bool verbose )
{
if (verbose)
- wxLogDebug(wxT("
wxGIFH
andler is read-only!!"));
+ wxLogDebug(wxT("
GIF: the h
andler is read-only!!"));
return FALSE;
}
return FALSE;
}
@@
-97,8
+97,8
@@
bool wxGIFHandler::DoCanRead( wxInputStream& stream )
decod = new wxGIFDecoder(&stream);
ok = decod->CanRead();
decod = new wxGIFDecoder(&stream);
ok = decod->CanRead();
-
delete decod;
delete decod;
+
return ok;
}
return ok;
}