Jump to content
You must now use your email address to sign in [click for more info] ×

Some (random?) Exported PNGs are 5px off in length and width.


Recommended Posts

I have 60 artboards and all are meant to be the same size. When I export as PNG however, most are 3755x5250px but about 10 are 3750x5750px 

I couldn't work out why they were doing this so I duplicated an artboard of one of the correct ones and copied and pasted the objects over to the correct one; exported again and what do you know, not only did it not correct it; ones that were 3755x5250px are now 3750x5750px 

I can't work out rhyme or reason. 

 

Link to comment
Share on other sites

Position and size is whole pixel?

Do you export using Export Persona? Are the individual Slice created correctly?

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

Can you confirm those sizes again, James. You've said they're 5px off in length/width, but one of your numbers changed from 5250 to 5750, which is 500px.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Yes. Sorry my bad. 

Here's what I'm currently getting 

3755x5250

3750x5250

I didn't know about whole pixel position and size

When I select a layer "Absolute Sizes" is not ticked. 

How do I turn on whole pile position and size for all layers?

 

Meanwhile, yes, I'm using the Export Persona. The individual slices are artboards so I believe they're created correctly. 

 

 

 

Screenshot 2020-04-26 at 12.37.49.png

Screenshot_2020-04-26_at_12_37_28.png

Link to comment
Share on other sites

Select an Artboard and look at the Transform Panel.
If the X, Y, W and H are not all integers then your export will be larger than the artboard because the software has to ‘invent’ extra pixels to cope with the ‘overlap’.
(Not sure why you would get five extra pixels but making sure you’re using integers the first thing to look at.)

Link to comment
Share on other sites

The transform panel has been confusing me!

Isn't the transform panel simply showing me where in space the artboards are? I believed that all the objects inside the artboard would have X and Y coordinates relative to the artboard, not relative to the document as a whole but it seems that's not the case.

I can see why the W and H must be whole numbers but not the X & Y.

Does this mean I must move the artboards in the space until they are whole numbers?

See a few attached screenshots. 

Thanks for the help

 

 

Screenshot 2020-04-26 at 12.52.27.png

Screenshot 2020-04-26 at 12.52.09.png

Screenshot 2020-04-26 at 12.52.05.png

Link to comment
Share on other sites

Unfortunately yes, you will have to move the artboards.
The artboards are positioned within an overall ‘canvas’ workspace which is set to a specific DPI (Document Setup) and it is these pixels that the artboards need to be aligned to. I don’t know why, but you get used to it after a while.
You can set “Force Pixel Alignment” (Toolbar Icon) to make sure all new items automatically have integer positions.

Link to comment
Share on other sites

Great. Thanks so much for your help. 

It probably makes sense somehow but it seems odd that the placing of the artboards on the canvas would have some effect on their size when exported. 

Is there a way of telling them to be independent from the "canvas dpi" but still remain inside the canvas? 

I'm sure there's a reason for it but it's frustrating when I'm working in an artboard and I want an object to be 50px from the left of the artboard and I have to say X+10 and assume that the weird number it generates is right, you know?

 

Link to comment
Share on other sites

Sorry, I was reading "px" instead of "pt" in your screenshots too. The px values should be integers if you change the UOM to pixels.
As far as I know there’s no way to make the artboards independent from the canvas, think of it as one large document – what the DPI refers to – with artboards spread about on it.
In this case, if you have “Force Pixel Alignment” switched ON, make sure you have “Move by Whole Pixels” switched OFF.
You might be able to select all the artboards and move them a tiny bit to get them aligned but I haven’t tested that. Edit: Don't think that works.

Link to comment
Share on other sites

Hoorah. I had to change to pixels and just manually delete the decimals in every one. 

Holy cow that was a pain; tbh when I export an artboard I don't expect where it lies on the canvas to have any effect on its size; I can see why this happened now but I still think it's counterintuitive. Particularly since "whole pixels" and "snapping" and "force pixel alignment" have to be used and understood in concert to try and get the export at the right size! 

Baffling! 

 

That being said thanks for helping me get to the bottom of it! Much appreciated!😁

Link to comment
Share on other sites

You’re welcome.
I understand what it’s like to get confused by this but I can’t see Serif changing the way things work at this point in the game. (Maybe I’ll be proved wrong.)
Glad you’ve been able to get it fixed though. (Still don’t know why you were getting five extra pixels. Would have expected two at most, but not five.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.