#28495

You cannot increase size of pixels. You may increase image size in pixels.

For example:

width *= 5;
height *= 5;
BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
img.getRaster().setPixels(0, 0, width, height, pixels);

But, of course, pixels array must have a corresponding image data, match the new dimensions.

Also, if transparency is not absolutely necessary, I would recommend to use BufferedImage.TYPE_INT_RGB, or even BufferedImage.TYPE_BYTE_INDEXED to reduce resulting PDF document size.