Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Problem in StreamRasterEncoder
Problem in StreamRasterEncoder [message #28817] Fri, 17 September 2010 23:35 Go to next message
koldo is currently offline  koldo
Messages: 3046
Registered: August 2008
Ultimate Member
Hello Mirek

Now StreamRasterEncoder::SaveFile() function permits to save a null Image. This produces a "Memory leaks" error as function initial_setup in jcmaster.c, if detects that width or height is zero, does an exit().


Best regards
Iñaki
Re: Problem in StreamRasterEncoder [message #28856 is a reply to message #28817] Mon, 20 September 2010 09:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12126
Registered: November 2005
Ultimate Member
I hope this fixes it:

void StreamRasterEncoder::Save(Stream& s, Raster& raster)
{
	if(raster.GetWidth() == 0 || raster.GetHeight() == 0)
		return;
Re: Problem in StreamRasterEncoder [message #28861 is a reply to message #28856] Mon, 20 September 2010 13:32 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3046
Registered: August 2008
Ultimate Member
Of course yes Smile.

Best regards
Iñaki
Re: Problem in StreamRasterEncoder [message #30840 is a reply to message #28856] Mon, 24 January 2011 18:34 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

mirek wrote on Mon, 20 September 2010 11:59

I hope this fixes it:

void StreamRasterEncoder::Save(Stream& s, Raster& raster)
{
	if(raster.GetWidth() == 0 || raster.GetHeight() == 0)
		return;



void StreamRasterEncoder::Save(Stream& s, Raster& raster)
{
	if(!raster.GetWidth() || !raster.GetHeight())
		return;
Cool
Re: Problem in StreamRasterEncoder [message #30842 is a reply to message #30840] Mon, 24 January 2011 23:01 Go to previous message
koldo is currently offline  koldo
Messages: 3046
Registered: August 2008
Ultimate Member
Twisted Evil

Best regards
Iñaki
Previous Topic: plugin/jpg wrapper patch (SVN r2960)
Next Topic: CtrlCore_WinMetaFile patch (SVN r2960)
Goto Forum:
  


Current Time: Sun Dec 15 14:53:59 CET 2019

Total time taken to generate the page: 0.01341 seconds