Rotate Image - Angle Adjuster API
PDF4me Rotate Image is a powerful enterprise-grade solution that rotates images with precise control through advanced API integration. This comprehensive image rotation service efficiently processes image files, providing precise angle control, background color customization, proportional scaling options, and advanced image processing capabilities for enhanced image correction and content management. The API processes image rotation by receiving source images through REST API calls, utilizing advanced rotation technology and intelligent scaling algorithms for accurate image transformation and professional image processing. With comprehensive support for multiple rotation angles, background color control, proportional scaling, and professional image processing, this solution is ideal for image correction, content management, automated rotation, and enterprise image workflows that require reliable image transformation with guaranteed accuracy and consistent output quality. Rotate Image documents easily with API for advanced image processing and transformation.
Authenticating Your API Request
To access the PDF4me REST API, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user of the REST API.
Key Features
- Precise Angle Control: Rotate images by specific angles with pixel-perfect accuracy
- Background Color Control: Customize background color for rotated image areas
- Proportional Scaling: Maintain image proportions during rotation operations
- Format Support: Support for various image formats including JPG, PNG, BMP, TIFF, and more
- Quality Preservation: Maintain image quality during rotation operations
- Professional Results: High-quality image rotation with accurate angle control
- Seamless API Integration: RESTful API designed for automated image processing workflows and enterprise system integration
REST API Endpoint
The PDF4me REST API uses standard HTTP methods to interact with resources. All image rotation operations are performed through a single endpoint:
- Method: POST
- Endpoint:
/api/v2/RotateImage
Supported Image Rotation Features
The API provides comprehensive support for various image rotation and transformation capabilities:
Rotation Control
- Precise Angles: Rotate images by specific angles with pixel-perfect accuracy
- Multiple Orientations: Support for 90°, 180°, 270°, and custom angle rotations
- Quality Preservation: Maintain image quality during rotation operations
- Professional Results: High-quality image rotation with accurate angle control
- Advanced Processing: Support for complex image structures and rotation requirements
Background Control
- Color Customization: Customize background color for rotated image areas
- Transparency Support: Support for transparent backgrounds and alpha channels
- Professional Layout: High-quality image rotation with accurate background handling
- Advanced Processing: Support for various background scenarios and color requirements
Scaling Options
- Proportional Scaling: Maintain image proportions during rotation operations
- Flexible Scaling: Support for both proportional and non-proportional scaling
- Quality Maintenance: Preserve image quality during scaling operations
- Professional Enhancement: High-quality image processing with accurate scaling
- Flexible Options: Customizable processing parameters for specific requirements
REST API Parameters
Complete list of parameters for the Rotate Image REST API. Parameters are organized by category for better understanding and implementation.
Important: Parameters marked with an asterisk (*) are required and must be provided for the API to function correctly.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| jobIdExt | Optional | Your own reference for this call. It is stored with the API call log so you can correlate calls with your jobs. Type: string. | |
| integrations | Optional | Integration identifiers, forwarded unchanged with the job's notification settings. Type: array. | |
| isAsync | Optional | Set to `true` to process the action asynchronously and get a job to poll at `/api/v2/GetActionStatus`. Only honoured by actions that support asynchronous processing. Type: boolean. | |
| docName | Optional | Source file name including its extension. Several actions dispatch on the extension, so it should always be set; when omitted a per-action default is used. Type: string. | |
| docContent | Required | The source file. Accepts the base64-encoded file content, a `pdf4meblobid://<id>` reference to a previously uploaded blob, or an `https` URL to the source document. Required: an empty value fails with `File is empty`. Type: string. | |
| docContentBytes | Optional | Alternative raw byte payload for the source file. Type: string. | |
| callBackUrl | Optional | Optional URL notified when an asynchronous job completes. Type: string. | |
| backgroundcolor | Optional | Color that fills the areas uncovered by the rotation, as a color name or hex value. Type: string. | |
| proportionateResize | Optional | Resize the image proportionally so the rotated image fits. Type: boolean. | |
| rotationAngle | Optional | Rotation in degrees; positive values rotate clockwise, negative counter-clockwise. Type: number. | |
Output
The PDF4me Rotate Image REST API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
{
"File Content": "Output file content from the PDF4me Connect"
}
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| File Content | Output file content from the PDF4me Connect |
Schema View
The data structure and types of the response:
1 item
File Content: Binary Output file content from the PDF4me Connect
Type Indicators:
Binary= Binary data
Binary Data View
The actual rotated image file data:
data
─────────────────────────────
File Content: Output file content from the PDF4me Connect
Binary Data Access:
- Image Content: Ready for download or further processing
- Rotated Image: Complete image with applied rotation
Request Example
Header
Content-Type: application/json
Authorization: YOUR_API_KEY
Note: Get your API key from the PDF4me Dashboard
Payload
{
"Nama file": "image.jpg",
"Konten file": "Please put image base64 content",
"Warna latar": "white",
"Pembesaran proporsional": true,
"Sudut rotasi": 90
}
Code Samples
The PDF4me Rotate Image REST API provides code samples in multiple programming languages. Choose the language that best fits your development environment:
- C#
- Java
- JavaScript
- Python
- Salesforce
- n8n
- Google Script
- AWS Lambda
Google Script Sample
Google Apps Script implementation for Google Workspace integration:
Image Rotation Features
Rotation Control
- Precise Angles: Rotate images by specific angles with pixel-perfect accuracy
- Multiple Orientations: Support for 90°, 180°, 270°, and custom angle rotations
- Quality Preservation: Maintain image quality during rotation operations
- Professional Results: High-quality image rotation with accurate angle control
- Advanced Processing: Support for complex image structures and rotation requirements
Background Control
- Color Customization: Customize background color for rotated image areas
- Transparency Support: Support for transparent backgrounds and alpha channels
- Professional Layout: High-quality image rotation with accurate background handling
- Advanced Processing: Support for various background scenarios and color requirements
Scaling Options
- Proportional Scaling: Maintain image proportions during rotation operations
- Flexible Scaling: Support for both proportional and non-proportional scaling
- Quality Maintenance: Preserve image quality during scaling operations
- Professional Enhancement: High-quality image processing with accurate scaling
- Flexible Options: Customizable processing parameters for specific requirements
Industry Use Cases & Applications
- Use Cases
Use Cases
- Image Correction: Correct image orientation for proper display and presentation
- Content Management: Rotate images for content management systems and workflows
- Photo Processing: Process photos with correct orientation for albums and galleries
- E-commerce: Ensure product images display correctly with proper orientation
- Web Development: Rotate images for web applications and responsive design
- Print Production: Rotate images for print materials and publications
- Mobile Applications: Process images with correct orientation for mobile apps
- Business Process Automation: Automate image rotation workflows for enterprise operations