Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Clarify image export rules when sub-pixel position and/or size

    Please see the attached .xar. In it I have 4 xara objects and their .png exports. The objects differ slightly in that they are positioned on the page and/or sized either to whole pixels or sub-pixels. Click on each object under the 'Xara Objects' heading and look at the 'X' 'Y' 'W' and 'H' values to see what I mean. In the next column ('PNG Eqivalents') are the same objects as PNG format exports.

    Now zoom in on the edges of the PNG objects and you'll notice some have sharp edges and others are slightly aliased (you'll probably need to go to 800% and above to see this). I know that Xara intentionally does this but I have the following questions:

    1) Why Xara do this, what purpose does aliasing exports of sub-pixel positioned/sized objects serve?
    2) Why has the 3rd box ('FRACTION PX POS, FRACTION PX DIMENSION') exported with a sharp edge? I was expecting aliased edges as it was positioned sub-pixel.
    3) Can this 'feature' be disabled or is it up to the user to remember to check objects prior to export?
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2001
    Location
    Surrey, BC, Canada
    Posts
    2,379

    Default Re: Clarify image export rules when sub-pixel position and/or size

    Hi
    Your text on the left are not whole pixels, maybe that is the problem. To export clear one has to have whole pixels not fractions.
    This is quick response.
    JIm

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: Clarify image export rules when sub-pixel position and/or size

    Thanks for the reply but the text is not relevant here, its just there to clarify the box position and size. I've changed the file to remove the text and use colours instead and the same differences can still be seen.
    Attached Files Attached Files

  4. #4
    Join Date
    Feb 2007
    Location
    UK
    Posts
    21,340

    Default Re: Clarify image export rules when sub-pixel position and/or size

    if you look at the 'bitmap size' tab of the export dialog box you will see that your 300.5 pix by 50.5 pix is actually exported as 301pix by 51pix - the program does not support exporting sub-pixel values, so these are 'rounded-up' by anti-aliasing

    regarding the third box - it is only the pixel dimension causing this, not position, so this is sharp

    [quick semi-technical reply - building on what Jim said]
    Last edited by handrawn; 16 December 2010 at 07:33 PM.
    -------------------------------
    Nothing lasts forever...

  5. #5
    Join Date
    Feb 2007
    Location
    UK
    Posts
    21,340

    Default Re: Clarify image export rules when sub-pixel position and/or size

    a bit of additional technical:

    if you export your 300.5pix by 50.5pix bitmap with quality set to 'full color' it will export with sharp edges, but still at 301pixels by 51pixels in size, as the pixels have again been made whole, but without anti aliasing
    Last edited by handrawn; 16 December 2010 at 08:08 PM. Reason: correction
    -------------------------------
    Nothing lasts forever...

  6. #6
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: Clarify image export rules when sub-pixel position and/or size

    Hi Steve, thanks for clearing that up - it makes perfect sense that it's the size not the position that dictates the anti aliasing. When you said 'full color' did you mean 'true color'? I tried exporting again but still get the anti aliasing whenever the size is sub-pixel.

  7. #7
    Join Date
    Feb 2007
    Location
    UK
    Posts
    21,340

    Default Re: Clarify image export rules when sub-pixel position and/or size

    Hi

    its the program view quality setting for screen rendering display that determines this [window menu > quality ; or put the 'set view quality' slider on the standard tool bar in mid position]


    'Very High Quality' & 'High Quality' have anti-aliasing, the other settings do not, and basically the export takes its cue from this
    Last edited by handrawn; 17 December 2010 at 08:24 AM. Reason: clarity
    -------------------------------
    Nothing lasts forever...

  8. #8
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: Clarify image export rules when sub-pixel position and/or size

    Excellent, thank - I never realised this!

    Is there a way of forcing Xara to size object to the nearest full pixel? I think this would be useful when using Xara to create web sites where the concept of 'sub pixel' sizing is irrelevent.

  9. #9
    Join Date
    Feb 2007
    Location
    UK
    Posts
    21,340

    Default Re: Clarify image export rules when sub-pixel position and/or size

    pleasure - bear in mind, without anti-aliasing smoothing, curved lines will be stepped [jagged]

    I know of no way of forcing whole pixels

    You could snap to grid spacing....
    -------------------------------
    Nothing lasts forever...

  10. #10
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: Clarify image export rules when sub-pixel position and/or size

    Hi Steve, one last observaton if I may... have a look at the attached file. It contains a whole pixel positioned and sized box (200 x 200) that was manually exported as a PNG and also exported as a web page.

    The manual export version is correct (i.e. 200x200 and no aliasing) BUT the web version is 201 x 201 and with anti aliasing. Any idea why this would be?
    Attached Files Attached Files

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •