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

Free Support Forum - aspose.com

Rasterizig an AutoshapeEx Object

Hi,



I am working with adobe and evaluating Aspose.slides for my current project requirements.



The Shapes property of a slide provides me an array list of all the shapes in the slide. Now, the ShapeType property tells me the type of the shape like “smiley face”,“oval” etc.I need to rasterize the autoshape into an image like jpeg, png etc. How can I obtain the raster of an AutoshapeEx object. I couldn’t find any thing in this class which returns me GDI calls list using which I can rasterize the shape.



Thanks in advance.

Nikihil

Dear Nikhil,

With Aspose.Slides, you can get the image of the individual shapes. These individual shapes are actually the part of the region of slide itself where shape resides.

Please read this thread for better understanding.

https://forum.aspose.com/t/104310

Hi,

Thanks a lot for replying to my query. I looked into the thread pointed by you. In the thread you have talked about some code shared by you but I don’t have that code. Nevertheless, right now my problem is that you have mentioned the use of Shape.X, Shape.Y, Shape.Width and Shape.Height properties of Shape.

In many cases, the value of this property turns out to be NaN. I could figure out that this case occurs when the shape is inherited from the layout slide and has not been modified in the slide in terms of its placement( I might be wrong). But if I get the properties value as NaN then how do I resolve them in my code.

If I need to fetch the value from the shape from the layout slide then how do i get to the shape in the layout from which the shape in the slide has been derived.

Thanks,
Nikhil

Hello Nikhil,

We have “Creating Shape Thumbnail Image” article in the programmer’s guide.

Hi,

Now I understand the problem. Actually all the examples you were talking about are for powerpoint 2003 files i.e. ppt files but i am interested in PowerPoint 2007 files i.e. pptx files.

I am using all the classes from the Aspose.Slides.Pptx namespace instead of Aspose.Slides.
I have noticed that APIs and properties supported by the classes for PowerPoint 2003 files are much more than those supported for PowerPoint2007 files. In other words, Properties and APIs for PowerPoint 2007 files are not enough.

The Shape class from Aspose.Slides class has Shaperectangle and MasterShapeId properties using which we can resolve the actual coordinates of the shape. But the ShapeEx class from the Aspose.Slides.Pptx namespace doesn’t have these properties. Although it do have X, Y, Width and Height properties but doesn’t have any MasterShapeId property. In case the coordinates of shape are inherited from LayoutSlide instead of slide itself then MasterShapeId is required to resolve the coordiantes whch ShapeEx doesn’t support.

Is it the case that you support less functionaly for PowerPoint 2007 files i.e. for classes in the namespace Aspose.Slides.Pptx then those in the namespace Aspose.Slides or there is always some other way to get around these limiltations and that is the reason why you don’t support such properties?

In case, you too feel that Pptx support is not sufficient in Aspose then When are you planning to support all the features for Pptx too?

I am using .NET 2.9.2.0 version(Hot Fix) of Aspose.Slides.dll which I downloaded from your aspose.com. I think this the latest version available on your site.

Thanks,
Nikhill

Hello,

Pptx format is in development. Rendering will be available in 3-4 months.