Sure, you just need to Blit it somewhere safe.
so, IDirectFB::CreateSurface with the same size, Window::GetSurface to get your surface, and then Surface::Blit( to, from ). You can also keep your window "full screen" and use the Window Geometry settings to scale at wish, but this will scale then on every redraw/exposure.

hth
Niels

Tu Duong Manh wrote:
Hi,

i always scaling images for different views. I've got different scaling-functions. Is there a way to save the image after the scaling as a new image?!

Regards

int scale4(int *image_width,int *image_height )
{       if  (*image_width > 290)
{ *image_height= ( 290 * *image_height ) / ( *image_width ) ; *image_width= 290 ;
        }
if (*image_height > 195) { *image_width= ( 195 * *image_width ) / ( *image_height ) ; *image_height= 195 ;
        }
return 0;
}

int main(...)
{
...
dfb->CreateImageProvider (dfb, pfad[i] , &provider);
provider->GetSurfaceDescription (provider, &dsc);
scale4 (&dsc.width,&dsc.height);
layer->CreateWindow( layer, &wdesc, &win1 );
win1->GetSurface( win1, &surf1 );
win1->SetBounds(win1,160-dsc.width/2 ,117-dsc.height/2 ,dsc.width, dsc.height);
provider->RenderTo (provider, surf1, NULL);                                     
                     
surf1->Flip (surf1, NULL, DSFLIP_WAITFORSYNC);
win1->AttachEventBuffer( win1, buffer );
win1->GetID( win1, &win1_id );
win1->LowerToBottom( win1 );
win1->SetOpacity( win1, 255 );
...
}


__________________________________________________________________________
Verschicken Sie SMS direkt vom Postfach aus - in alle deutschen und viele ausländische Netze zum gleichen Preis! https://produkte.web.de/webde_sms/sms



_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users



--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to