aspose-free-consulting / projects

The starting point for Aspose free consulting projects
5 stars 5 forks source link

Only select certain images? #366

Closed thegorilla closed 2 months ago

thegorilla commented 5 months ago

Is there a way to only select certain images (say images above 30px)?

We are using Kentico Version 13 on a Windows server; c# visual studio.

Thanks

AlexNosk commented 5 months ago

@thegorilla Could you please elaborate what is your input document format?

PS: Please note the main place for getting support is Aspose support forums.

ESidenko commented 5 months ago

Hi, @thegorilla If you use Aspose.Imaging, you can do something like

using (var image = Image.Load("fileimage.jpg"))
{
   if (image.Width > 30 && image.Height > 30)
  {
    // process image
  }
}
thegorilla commented 5 months ago

Hi, thanks for coming to me.

The input document is either Word or PDF and we are using Aspose.PDF to run the conversion. There are many images within these documents.

Is there a way to select all images within a document and have the system check the image against certain parameters?

asadalikhan90 commented 5 months ago

@thegorilla

The images are stored in the PDF documents in the form of streams and it is not possible to extract every information. However, there are still some options and images properties that you can extract from a PDF document using Aspose.PDF. Please check the sample code snippets in the below documentation articles.

Get Resolution and Dimensions Working with Image Placement

In case you face any issues or have another inquiry, please feel free to create a post in official support forum which is recommended place for such discussions and proper follow ups.