Jump to content

  • Log In with Google      Sign In   
  • Create Account


Tdawg30

Member Since 15 Apr 2012
Offline Last Active Jan 19 2013 11:59 PM
-----

Topics I've Started

Reducing Bitmap Object size

14 May 2012 - 11:06 PM

Hey, just wondering is there anyway of reducing the size of a bitmap object(space on the disk, not dimensions) before I save it to disk? I have a program which is accepting images as input, changing the RGB values of the image, and then outputting the new image, the problem is the outputted image always takes up more memory than the original image even though if I am not adjusting its dimensions in anyway.

Google searches typically turn up information regarding dimensions and not disk space. Any information on handling images in a different fashion or reducing the space of a bitmap object would be appreciated.

class members, stack or heap?

16 April 2012 - 04:27 PM

Just a quick questions regarding class members being on the stack or heap.

For example say I have:

Class Foo
{
public:
	 Foo(int someNum);
private:
	  int x;
};
Foo::Foo(int someNum)
{
	 x = someNum;
}

which I then use later in my program:

int main()
{
	  Foo x(10);	 //x object is put onto the stack
	  Foo* y = new Foo(10);	//y points to a foo object on heap
	  return 0;
}

Would the member variables of object pointed to by y be on the stack? or heap? Do I even need to concern myself with this sort of detail?
Thanks.

PARTNERS