We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Re: Aspose Imaging - Compact Framework

The issues you have found earlier (filed as 31416) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Thank you very much, good job! Now my code works without error.

Now I have to problem:

1. I'm not able to load the image in attach

2. I need to know how to display the loaded image on my HDC. I need a sort of BitBlt function.

Could you help me ?

Thank you in advance.

Regards

KCC

Hi KCC,


I can reproduce the loading issue with your provided PNG file. Also I have noticed that other PNG files [one is attached] can be loaded with out any problem. Therefore I have recorded an investigative ticket under Id 31783. We will probe further into this issue and will keep you posted with updates.

Regarding point 2), I’m sorry I am unable to understand your need. Can you please elaborate further?

Hi,

thank you very much for your quick answer.

My question is simple: I would like to use your library in a small CAD application for windows mobile devices. So I have an Handle Device Context of the form/window where I display my drawing; on this device context I have also to display the loaded image.

As I wrote I need a sort of BitBlt functions that allow me to display the loaded image on a form.

Is it clear now ? Otherwise, please contact me again.

Thank you in advance.

Regards

KCC

Hi KCC,


Thank you for providing us further details.

We have forwarded your request to our development team. As soon as we hear from them, we will update you here.

Regards,

Hi again,


Below is the source code for drawing Aspose Image over the required System.Drawing graphics. This code will work with all images except PsdImage.


///
/// Draws an Aspose image over the hdc surface.
///
/// The Aspose image.
/// The handle device context.

private void DrawImage(Aspose.Imaging.Image image, IntPtr hdc)

{

using (System.Drawing.Graphics graphics = System.Drawing.Graphics.FromHdc(hdc))

{

using (var gdiImage = Aspose.Imaging.Extensions.ImageExtensions.ToGdiImage(image))

{

graphics.DrawImage(gdiImage, 0, 0);

}

}

}



Hi,

thank you for the answer, the code works but ... I'm not fully convinced, because

- the method ToGdiImage, perform a copy, in memory, of the original image ? With big images this could be a problem.

- is it necessary to create a Graphics object ? Is not really possible to display the image directly on HDC ?

What do you think ? I'm looking for the fastes and efficient solution possible.

Thank you in advance.

Regards

KCC

Hi KCC,

No such API is available at the moment but a new issue to provide API to place the image directly on HDC in an efficient way has been logged into our issue tracking system as IMAGING-31867. We will keep you updated on this issue in this thread. Sorry for the inconvenience.

Please feel free to contact us in case you have further comments or questions.

Best Regards,