Jump to content
seabirdr

Size adds 1px when creating slice

Recommended Posts

(Attached file "bug adding size 1 1.afdesign" can reproduce the bug)

 

This is a perfect w=35px h=35px group. Coordinates and sizes are both integers. 

post-40119-0-60361200-1479905017_thumb.png

 

Decimal Place for pixels is set to 3.

post-40119-0-88300100-1479905033_thumb.png

 

 

Create slice in export persona, its width became 36px, which is expected to be 35px.

post-40119-0-44938000-1479905052_thumb.png

 

This happens once in a while, and I've found a workaround:

 

If I copy the group - "perfect 35" to a new file; set its coordinate to x=0 y=0 and create slice again, I can get the slice with correct size: w=35px, h=35px.

post-40119-0-27078700-1479905066_thumb.png

 

 

 

Exporting is supposed to be a light work with the user-friendly export persona. However, When I was working on a urgent project this afternoon, I encountered this bug. It brought me only pressure and frustration. I had to check each slices very carefully and re-sliced the incorrect ones with the workaround. Finally I got my work done. But what If i didn't know the workaround before?

 

I knew this bug and found the workaround some days ago. I didn't report it because I thought you proberly knew this and had schedules. However, let alone this bug destories the mood whenever it shows up, knowing its existence, I have to keep checking carefully to ensure everything is correct. What a burden! I hope export persona become a partner I can trust as soon as possible.

 

 

 

Windows 7 64 bit

Affinity Designer 1.5.0.36

 

(I've send the attached file to a Mac user and the bug was reproduced)

bug adding size 1 1.afdesign

Share this post


Link to post
Share on other sites

Your rectangle is not perfectly positioned.  If you use the Transform panel, select the text in the x position, then use the cursor keys to increment then decrement the value, it will then be perfectly positioned on pixel - the export rectangle will then be 35x35 pixels.

As it was, the x position was very slightly over, so the width of the export box was being round up to 36 pixels.

 

Alternatively, for your example, use snapping with snap to grid on - move the rectangle and it will snap to position.

 

I tried both these methods, and both corrected the export rectangle to 35x35.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

I've just tested this too and Ben is spot on. I've seen this issue raised a few times before and I have never seen a definitive answer, until now. I'll make sure to take a note of this  :P

Share this post


Link to post
Share on other sites
Very happy you pinpoint the cause.  The solutions work.

I set the decimal place to 6 and see the decimals.

 

Ben, thanks for you fast help.

Chris B, thanks for you attention.

Share this post


Link to post
Share on other sites

I've just tested this too and Ben is spot on. I've seen this issue raised a few times before and I have never seen a definitive answer, until now. I'll make sure to take a note of this  :P

Hi, Chris B

 

Hope AD could add a tip for novice or add a tip on Export Persona about this.

 

Thx.

Share this post


Link to post
Share on other sites

I can see the value of placing artboards on sub pixels but then surely AD should be auto aligning the layer slice to the relative X-Y, 0-0px position for each board? Drove me mental!! Thanks for the solution though. No more angry developers shouting at me cus I've missed a keyline around hero pics :) I'd suggest this as a fix though, or you're going to keep getting people posting on this one.

Share this post


Link to post
Share on other sites

So is this actually intentional or a bug to be fixed? Cause if I'm honest, i don't think this should happen at all. It makes no sense from a UX standpoint. the position on the axis shouldn't affect the height and width output of a document in any way, should it?


iMac (Retina 5K, 27-inch, 2017), 4,2 GHz Intel Core i7, 64 GB 2400 MHz DDR4, Radeon Pro 580 8192 MB, ROG PG348Q

Share this post


Link to post
Share on other sites

Hi farbenfeuer,

It's not that simple. In Designer Artboards are a special type of object/shape (more or less) and as such they can be positioned anywhere on the document, aligned or not with the pixel grid. If you enable Force Pixel Alignment in the Snapping Manager from the beginning it will ensure that all objects - artboards included - will be aligned to the pixel grid.

Share this post


Link to post
Share on other sites

Well ok, but honestly i still think it shouldnt act that way. Sure knowing why it happens helps in future, to avoid it, but for every project it is an extra step to check the positioning and rounding it up to avoid it, which i should not have to think about. Pixelgrid alignment also isn't an option cause i don't always want that to be enabled.

 

Don't get me wrong, i'm getting its a technical thing and how the app works and all that, i'm just giving you my user experience feedback and how i ultimately feel about it. If you can change it, in my humble opinion i think you should. If you can not, i would've loved a way to know about that, without having to spend a LOT of time looking through forum posts, then writing a bug report and yadayada. 

Think about more pro's trying to convert over from adobe like me. Even "small" things like that can be off-putting - especially if you're in a stage of "can i trust this app over adobe". You export your first document and what do you see? Your file output states a different pixel size than the one you specifically entered. As stated again and again. I'm very critical with my feedback, but mainly out of love for your product(s). I want it to be a thing, so i can have it as a thing.

 

Ultimately though, i'm not walking the miles in your shoes. ;)

 

Just my 2cents.

 

Tim


iMac (Retina 5K, 27-inch, 2017), 4,2 GHz Intel Core i7, 64 GB 2400 MHz DDR4, Radeon Pro 580 8192 MB, ROG PG348Q

Share this post


Link to post
Share on other sites

I've just experienced this problem again and it is definitely a pain to sort! The way I see it, a 250px wide object should export to a 250px wide bitmap image. No mucking around with perfect alignment etc.

Share this post


Link to post
Share on other sites

I have come to live with the fact that i have to double check and correct the positioning for every artboard i set up. It still is something id rather not have to do, but what can you do.
 
Now on the other hand, i have experienced the similar problem but WITH the rounded positioning. Funny enough it worked the 7 or so times before that. To explain my process: I'm doing a webdesign for a client and wanted to put placeholder client logos in it. For that i downloaded a big image with a lot of small fake logos on it. I then set up the artboard and crop masked the part that i want to be shown, so you dont see the logos adjacent to the one shown. i then just simply exported the logo, moved over the image under the mask to bring the next logo in line to the visible area and then exported again - rinse and repeat.

Now oddly enough, the first 6 times it worked as intended only from the 7th on it now all of a sudden adds 1px to the width - not the height of the image. 
 
Any ideas why that is?

 

ps i have made screenshots, but for whatever reason i can't find a way to attach them... Can i only do that with my own threads or am i just blind right now? Oo


iMac (Retina 5K, 27-inch, 2017), 4,2 GHz Intel Core i7, 64 GB 2400 MHz DDR4, Radeon Pro 580 8192 MB, ROG PG348Q

Share this post


Link to post
Share on other sites

I have encountered the error too. It really pissed me off, as i have completed a huge project and now i have to deal with this. Even though the feature may be something positive.

 

But a proper tutorial, tips and tricks and how to actually use it and not get into this problem.


Follow me: Instagram | Dribbble

Share this post


Link to post
Share on other sites

Yup, I fiddled with that too at the beginning and although I agreed that on a user point of view, it's an annoyance, I came to make peace with it. At least, as long I work with artboards that need to be exported in pixels.

 

However, it's a bigger problem when I need to export a PDF in inch or CM sizes that don’t make a round pixel number. My slices do snap nicely to the top left of my artboards, so I know I'm well aligned with the grid, but it never aligns with the bottom or right edge. So I either end up with borders on my export, or I need to crop the artboard slightly. White borders are a problem the exported PDF needs to be placed on a background other than white, and slightly cropped art-board means that my export size in CM or inch will be off.   

 

Any workaround for that one?

 

Share this post


Link to post
Share on other sites

Note this is not a problem when the exported slices include bleed, but it is for ads or thumbnails that need to be a specific size, without bleed. And since those usually need to be sent out and I cannot ask the suppliers to work around my files, they need to be tight on my end.

Share this post


Link to post
Share on other sites

I just found out THE FIRST ARTBOARD(S) to the TOP or LEFT defines the grid from which the slices will snap to. 

 

In practice, you could have a hundred artboards, well aligned to the pixel grid and their slices, but if you move or create an artboard that is on the top/left of your document and don’t align it to the pixel grid, all other artboards will now be off — the grid origin has moved to match the top or left artboard, and everything that was on the previous grid origin no longer aligns.

 

Two artboards can each defines the pixel snapping origin if the artboard on the left isn’t also the top artboard. In that  case, the left artboard will only define the left origin. Same goes for the top.

 

So watch your edges!

 

 

Share this post


Link to post
Share on other sites

Arrrrg... I just spent haft of my day fixing some artboards/slice alignments — and I've known how it worked for a while already. (Except for the top left alignment which I just posted above). Now I have to go and check months of production files.

 

On 2017-02-02 at 6:26 AM, MEB said:

It's not that simple. In Designer Artboards are a special type of object/shape (more or less) and as such they can be positioned anywhere on the document, aligned or not with the pixel grid. If you enable Force Pixel Alignment in the Snapping Manager from the beginning it will ensure that all objects - artboards included - will be aligned to the pixel grid.

 

I understand that this might be a programming nightmare to address, but It sure feels like the nightmare had been passed on to the users instead... Slices should simply align with their parent artboard. Always. Period. It might seem like a small issue compared to all great things accomplished by the Affinity team, but grrrr.

 

Hopefully that will get resolved in a future release.

Share this post


Link to post
Share on other sites

Hi,

 

is there a way to set the option "Force Pixel Alignment in the Snapping Manager " as default?

It seems it keeps that option off every doc you create. 

It should be the opposite, force by default and in case of need you set the option to off.

 

Thanks

 


 

Share this post


Link to post
Share on other sites
On 2018-04-04 at 0:50 AM, agalberto said:

Hi,

 

is there a way to set the option "Force Pixel Alignment in the Snapping Manager " as default?

It seems it keeps that option off every doc you create. 

It should be the opposite, force by default and in case of need you set the option to off.

 

Thanks

 


 

 

Weird, do you have the latest version? Normally, that option stays on/off until you change it back.

 

 

 

Share this post


Link to post
Share on other sites
On 05/04/2018 at 9:59 PM, arkinien said:

 

Weird, do you have the latest version? Normally, that option stays on/off until you change it back.

 

 

 

 

I have Version 1.6.1. 

Do you have the option enabled by default when you create a new doc? 

 

They said "If you enable Force Pixel Alignment in the Snapping Manager from the beginning it will ensure that all objects - artboards included - will be aligned to the pixel grid"
So EVERY doc you create you should enable it. :-(

 

Besides i discovered that if you duplicate Cmd-D the artboard, it keeps the pixel integer 

but if you ALT-Drag the artboard it looses the force alignment.

 

 





 

 

 


 

Share this post


Link to post
Share on other sites

Hi agalberto,

What i meant was that you have to make sure Force Pixel Alignment is enabled before you start working/drawing objects etc to ensure they all get pixel aligned. If you don't do it, any object you create before enabling Force Pixel Alignment will remain as it is - that is, enabling this option will NOT align automatically all previous objects you created.

 

Both ⌘ (cmd) and ⌥ (option/alt) can be used to duplicate an artboard. The only difference between them is that ⌥ (option/alt) will override the snapping settings (including Force Pixel Alignment) while ⌘ (cmd) honours them. So use ⌘ (cmd) when duplicating artboards to ensure the Snapping options/Force Pixel Alignment setting are honoured and to get a pixel aligned artboard.

Share this post


Link to post
Share on other sites

No offense guys, but i still think this is a stupid behaviour that should be fixed or changed however possible. You shouldnt have to worry or think about that stuff. I dont even wanna go there to think about how much time i lost due to having to export images at least once over again, because it messed up the dimensions and i had to go back and fix the values. Or even just the couple seconds to everytime round up the values by hand. Those add up too. Plus it feels bad to have to remember to do that...

 

And pixel alignment is something i hardly need or use at all, so theres that...

 

Isn't it possible for you to just - as already suggested - force the alignment just for the artboards and make it an option in the settings to change that or something? I mean i can't imagine what you would need that for anyway, but at least its an option. I dont understand why we need to have free form artboard creation anyway. Make it a set grid, that i can configure, and have new artoards align to it automatically, so i dont have to spent time doing that also.

 

Just my 2cents again.

 

Remember my critique still comes from a place of love. ;)

 

Cheers


iMac (Retina 5K, 27-inch, 2017), 4,2 GHz Intel Core i7, 64 GB 2400 MHz DDR4, Radeon Pro 580 8192 MB, ROG PG348Q

Share this post


Link to post
Share on other sites
18 minutes ago, farbenfeuer said:

No offense guys, but i still think this is a stupid behaviour that should be fixed or changed however possible. You shouldnt have to worry or think about that stuff. I dont even wanna go there to think about how much time i lost due to having to export images at least once over again, because it messed up the dimensions and i had to go back and fix the values. Or even just the couple seconds to everytime round up the values by hand. Those add up too. Plus it feels bad to have to remember to do that...

 

And pixel alignment is something i hardly need or use at all, so theres that...

 

Isn't it possible for you to just - as already suggested - force the alignment just for the artboards and make it an option in the settings to change that or something? I mean i can't imagine what you would need that for anyway, but at least its an option. I dont understand why we need to have free form artboard creation anyway. Make it a set grid, that i can configure, and have new artoards align to it automatically, so i dont have to spent time doing that also.

 

Just my 2cents again.

 

Remember my critique still comes from a place of love. ;)

 

Cheers

Exactly this. If I create something 200 pixels wide and it is not perfectly aligned to the pixel grid, the export should still be 200 pixels wide - regardless of where I place it. Anything else is counter-intuitive. 

Share this post


Link to post
Share on other sites
18 hours ago, Checkmate said:

Exactly this. If I create something 200 pixels wide and it is not perfectly aligned to the pixel grid, the export should still be 200 pixels wide - regardless of where I place it. Anything else is counter-intuitive. 

 

On a user perspective, yes exactly. The current behaviour is just creating a nightmare for the user. 

 

That also raises the question of alignements... Right now, you can align and distributes artboards which is awesome. Well, not really. Distributing artboards will just throw everything off grid. So on the one hand, users need be meticulous and well educated** about placing artboards, in the other, we tempt them function that will wreck everything.

 

** I'm all for learning software properly, but this issue is so counter-intuitive that you can pretty much only solve it by finding this forum. That might seem like a small issue, but if unresolved, this alone can be a deal breaker for many users.

 

Sorry, not very constructive, I just think that a big issue. I still love this software.

 

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | 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.