Skip to main content

Retrieve Image Information


Extract image information from an image using the image-info endpoint.

Extracting image information from the image-info endpoint is a breeze using DynamicPDF API. Refer to our documentation illustrating calling the endpoint directly (image-info) and using one of our client libraries.

tip

Check out Getting Started and Task Roadmap if you are new to The DynamicPDF API.

info

Refer to the API documentation and the client library documentation for the image-info endpoint.

Calling Endpoint Directly

curl --location 'https://api.dpdf.io/v1.0/image-info'
--header 'Authorization: Bearer DP--api-key--'
--header 'Content-Type: image/png'
--data '@/C:/temp/solutions/image-info/dynamicpdfLogo.png'

Run In Postman

Calling Endpoint Using Client Library

public static void RunOne(String key, String basePath)
{
ImageResource imageResource = null;
imageResource = new ImageResource(basePath + "getting-started.png");
ImageInfo imageInfo = new ImageInfo(imageResource);
imageInfo.ApiKey = key;
ImageResponse response = imageInfo.Process();
Console.WriteLine(PrettyPrintUtil.JsonPrettify(response.JsonContent));
}

public static void RunTwo(String apiKey, String basePath)
{
String key = apiKey;
ImageResource imageResource = new ImageResource(basePath + "multipage.tiff");
ImageInfo imageInfo = new ImageInfo(imageResource);
imageInfo.ApiKey = apiKey;
ImageResponse response = imageInfo.Process();
Console.WriteLine(PrettyPrintUtil.JsonPrettify(response.JsonContent));
}
Source: ImageInfoExample
   Follow us on social media for latest news!