Export an image - dimensions change...why?

Had this problem forever, only the project I am currently working on, its a critical issue...

I'm currently exporting some vector art as a png file to be printed later.  (I've also exported as jpg, same issue).
And, this applies to exporting the same art from Draw or Paint.

The entire image is clearly checked to be the required pixel dimensions, and yet the saved file is always 1-2px larger (both axis).
I can draw a simple outline box, any colour outline, any thickness outline, even invisible outline...
set the pixel dimensions...and export...and the saved image will be 1-2px larger.

I have to pre-think, and reduce the border dimensions by at least 1px (both directions) for the saved image to be the correct pixel dimensions I need.

Why is this?
I remember seeing this in previous verions of Corel, and as I said, I can export as png or jpg...I can also copy the art into Paint, and then export as.
The end result is the same.

Parents Reply
  • Create a new document.
    Set the document unit to "pixels" and switch to Pixels view mode (not really necessary at this stage).
    Change the page size to correspond with the template (number of pixels).
    Double click the Rectangle tool to create a rectangle with exactly the same size as the page.
    Give it a white fill (no fill will also work) and NO outline and lock it.

    This will be your template.
    A page with the correct size and a white/unfilled rectangle that is perfectly aligned to the page and to the pixel grid.
    This rectangle will make sure that the exported image will be correct (unless you for some reason put objects outside of it).

    I like that, Ronny. I have often used a "no outline, no fill" rectangle in a document to define the area that is exported to bitmap.

    I will add a small detail about alignment to the pixel grid...

    In CorelDRAW 2018, the page is centered on the pixel grid, so the approach you describe would require that the page height and width are both an even number of pixels.

    In CorelDRAW 2019, the option was added to "Align page with pixel grid" (aligns the bottom left corner of the page to the pixel grid). With that option in effect, the approach you describe would also work with an odd-number-of-pixels for page width or height.

Children