Resize Image for Print Publishing

Resize and convert manuscript images to KDP-compliant dimensions at 300 DPI for print-on-demand.

Who this is for

Self-publishers and book production teams use this recipe to prepare manuscript images for KDP or IngramSpark. Constrain images to the printable area (1500x2400 pixels for a 6x9 inch page at 300 DPI), sharpen after downscale, and convert to JPEG at high quality — ready for interior pages.

Request
curl -X POST https://api.iterationlayer.com/image-transformation/v1/transform \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": {
      "type": "url",
      "name": "diagram-03.png",
      "url": "https://storage.example.com/book/diagram-03.png"
    },
    "operations": [
      {
        "type": "resize",
        "width_in_px": 1500,
        "height_in_px": 2400,
        "fit": "inside"
      },
      {
        "type": "sharpen",
        "sigma": 0.5
      },
      {
        "type": "convert",
        "format": "jpeg",
        "quality": 95
      }
    ]
  }'
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUg...",
    "mime_type": "image/jpeg"
  }
}
Request
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });

const result = await client.transform({
  file: {
    type: "url",
    name: "diagram-03.png",
    url: "https://storage.example.com/book/diagram-03.png",
  },
  operations: [
    {
      type: "resize",
      width_in_px: 1500,
      height_in_px: 2400,
      fit: "inside",
    },
    {
      type: "sharpen",
      sigma: 0.5,
    },
    {
      type: "convert",
      format: "jpeg",
      quality: 95,
    },
  ],
});
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUg...",
    "mime_type": "image/jpeg"
  }
}
Request
from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")

result = client.transform(
    file={
        "type": "url",
        "name": "diagram-03.png",
        "url": "https://storage.example.com/book/diagram-03.png",
    },
    operations=[
        {
            "type": "resize",
            "width_in_px": 1500,
            "height_in_px": 2400,
            "fit": "inside",
        },
        {
            "type": "sharpen",
            "sigma": 0.5,
        },
        {
            "type": "convert",
            "format": "jpeg",
            "quality": 95,
        },
    ],
)
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUg...",
    "mime_type": "image/jpeg"
  }
}
Request
package main

import il "github.com/iterationlayer/sdk-go"

func main() {
    client := il.NewClient("YOUR_API_KEY")

    result, err := client.Transform(il.TransformRequest{
        File: il.NewFileFromURL(
            "diagram-03.png",
            "https://storage.example.com/book/diagram-03.png",
        ),
        Operations: []il.TransformOperation{
            il.NewResizeOperation(1500, 2400, "inside"),
            il.NewSharpenOperation(0.5),
            il.NewConvertOperation("jpeg", 95),
        },
    })
    if err != nil {
        panic(err)
    }
}
Response
{
  "success": true,
  "data": {
    "buffer": "iVBORw0KGgoAAAANSUhEUg...",
    "mime_type": "image/jpeg"
  }
}

Related Recipes

Start building in minutes

Free trial credits included. No credit card required.