This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

saving gifteditor resault to file

Hi

for some reason i remember seeing a forum post about saving the gifteditor result to file, but i can't find it?

thanks
Is this is what you are looking for?
it looks exactly like what i need

works great, only one question - how do i tell it o save only the edited region without the background?
say with the hat example how do i save only the edited area (inside the red rectangle) without the hat itself?
The RenderRegion method is exactly what you need. Just pass region name (you can find the name of the region in the Templates.xml file) to this method and it returns the Bitmap object with rendered region. The Bitmap class has the Save method to save itself into the image file.
working good with only one problem:
if i put more then one image in the region, it renders only one layer of image (last one).
strangely enough it renders more then one layer of text?

any ideas?
Hi!

It should render all objects (text and images both) in the region. Other objects, which are outside of the region, should not be rendered. And sometimes if object right near to the region boundary, it may be recognized as outside the boundary. It is a bug and we will fix it.

Right now you can use a workaround. Because in the gifteditor the region value need for design only and does not need for rendering to bitmap, you can set it to the null before render canvas and restore it back after. To do it replace this code:
//render canvas
Aurigma.GraphicsMill.Bitmap bp = _canvasViewer.Canvas.RenderWorkspace(dpi, Aurigma.GraphicsMill.ColorSpace.Rgb);

in the RenderRegion method in the PhotoLabelControl class to this code:
// Temporary remove region from rendered layer.
RectangleRegion rr = renderedLayer.Region;
renderedLayer.Region = null;
		
//render canvas
Aurigma.GraphicsMill.Bitmap bp = _canvasViewer.Canvas.RenderWorkspace(dpi, Aurigma.GraphicsMill.ColorSpace.Rgb);
		
// Restore region back.
renderedLayer.Region = rr;


Hope it helps.
Thanks for the quick reply

didn't test your solution yet, but the situation is strange:
I've been able to reproduce it consistently, it only happens with one image - the smiley.
and only when i put it near one of the corners, same place different image - all works fine.

is it a problem with the image or the software ?

and if it's a problem with the image how do i save my images to prevent it from happening?

also - when do you expect to have the bug fixed?
and if you are already working on it, can it be possible to have an image partially in the region ?
say half in the region and half out? and only render the part in it ?
Hi!

And I've managed to reproduce it with cartoon cat image 🙂 So it is definitely a software issue. And the workaround I suggested before should fix it.

and if you are already working on it, can it be possible to have an image partially in the region?

In the current functionality it can not be done. And it is by design. But we considered to change it, since we have got several requests about this feature.

also - when do you expect to have the bug fixed?

It will be fixed in the next Graphics Mill release. Unfortunately I'm not able to point the explicit release date.
about the next release - i know you can give an exact date but are we talking days/weeks/month ?

thanks
Hi,

The new version of Graphics Mill might be available in July or August.