Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2005
    Location
    Brisbane, Australia
    Posts
    39

    Default JPG or GIF Export is different size to image in Xara

    Hi,

    When I export an image to JPG or GIF, it is one or two pixels different to what it is in Xara X..this is a drawing created in Xara not an imported image

    For example, using the shape drawing tool create a 500px X 70px rectangle (that's all, nothing else), then save that as a GIF or JPG and it ends up 501 X 71.

    I've been using Xara for a few years, however in the past I haven't needed to get within a pixel, so haven't noticed this problem; maybe it's always been there. However now I need to be pixel perfect

    I have twiddled virtually every knob I can think of in Xara to solve this and can't e.g. DPI, Dithering, Anti-aliasing etc...you name it. In the export dialog it shows the image is going to be exported as 501 X 71, but even if you change it there it makes no difference

    Borders are turned off, in case anyone raises that. In the end, I had to re-size the image to 499 X 69 to get it to export as 500 X 70, which is pretty klunky.

    Does anyone have any ideas as to why this might be happening?

    Thanks,
    Patrick

  2. #2
    Join Date
    Jan 2001
    Location
    East Sussex, England
    Posts
    2,021

    Default Re: JPG or GIF Export is different size to image in Xara

    Check that the X and Y positions are at whole pixels.

    Christine

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,917

    Default Re: JPG or GIF Export is different size to image in Xara

    Welcome Newbietoo,

    Could you attach the xar file that's creating this strange behaviour (Post a reply and click on the "Manage Attachments" button).

    Christine, if it's only one shape I don't think the X & Y positions will effect the export size.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #4
    Join Date
    Aug 2005
    Location
    London, UK
    Posts
    532

    Default Re: JPG or GIF Export is different size to image in Xara

    If you are exporting an object with a shadow, the Infobar shows the object's dimensions without taking into account the shadow. If you first Group the object+shadow, the Infobar will report their combined size.

    I've never noticed a disagreement between the export dialogue box and the actual image so have no solid suggestions, but take a look at the Bitmap Size tab when you have the export window open - the DPI should be set to 96. Selecting "Maintain screen anti-aliasing" often adds an extra pixel though - you could try checking that one out. (Sorry, I took the screenshot when exporting a GIF rather than a JPEG so the DPI setting is greyed out, but hopefully it still illustrates my point)
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	screenshot.png 
Views:	477 
Size:	19.6 KB 
ID:	26955  

  5. #5

    Default Re: JPG or GIF Export is different size to image in Xara

    Because it's all too easy to draw shapes that cover half pixels, and because an exported GIF, or any bitmap, needs to include the whole drawing, the export will typically be one pixel larger than the object dimensions shown.

    The best ways to avoid this and the resulting 'white line around the edge' problem that annoys many people are;
    • Make sure the object, usually a rectangle is exact pixel X,Y and width and height.
    • If you have a rectangle you're exporting, it's usually better to have no outline

    It's also worth noting the Anti-aliasing options in the Bitmap Size tab of the export dialog. Usually it's best to select 'minimise visible anti-aliasing (which means it shifts objects very slightly to try and reduce the half pixel problem), but sometimes if you want the exact thing you see on screen, exact to fractions of a pixel (e.g. you have some very small text) it's sometime worth trying the 'Maintain screen anti-aliasing' option.

    Hints for making exact pixel rectangles
    In the Selector tool;
    • Set the X and Y values to whole pixel numbers, not fractional parts.
    • Click the bottom left corner part of the 'set origin' 9-way origin control
    • Switch off the small 'lock aspect ratio' little padlock button
    • Then you can enter an exact width and height as whole pixels, and press return

    The reason for setting the origin to the bottom left corner is to prevent the object moving when you alter the width or height. Usually it scales things around the center point and so moves the X and Y value. And the reason for switching off the aspect-lock button is to prevent one value changing the other.

    If you do that, your rectangle XY and width & height should be whole pixels and your exported size should be exactly the same. pixel size, with no anti-aliasing 'white edge' effects.

  6. #6
    Join Date
    Oct 2005
    Location
    Brisbane, Australia
    Posts
    39

    Default Re: JPG or GIF Export is different size to image in Xara

    Thanks for your help folks; I'm a bit overwhelmed with the response and I really appreciate the efforts some of you have gone to to help. This was my first post in this forum.

    Now you're not gonna believe this (well, perhaps you might)...

    I cannot now reproduce the problem! I spent literally hours trying to get around it when it first occurred. There was nothing I could do to prevent it i.e. I tried new pages, new drawings (there were no shadows, outlines or any other effects), I should have mentioned too that I always enter the dimensions, rather than dragging the image...nevertheless, it always happened

    However, when I returned to it today in light of your advice, I re-sized the 499 X 69 image to 500 X 700 and lo' it exported at 500 X 70. I then played around with point values for XY and various other controls and it always exports faithfully (now) at 500 x 70 i.e I now can't screw it up even if I try! None of your (gracious) suggestions seems to have an impact. It all works fine.

    I should mention that shutting down and re-starting Xara was one of the remedies I tried originally; the usual if nothing else works approach. So simply re-starting Xara isn't an explanation...I'm now stumped for an explanation.

    This is one for the "X-Files" I think (Mulder and Scully that is, not Xara!)

    Thanks for all your help, I really appreciate it

    Patrick
    Last edited by Newbietoo; 24 June 2006 at 12:55 AM.

  7. #7
    Join Date
    Oct 2005
    Location
    Brisbane, Australia
    Posts
    39

    Default Re: JPG or GIF Export is different size to image in Xara

    HALLELULJA!!

    A problem I have been wrestling with for ages, and that has been a much bigger one that the one I raised above, is blurry text. I've trolled this forum looking for a solution to that; downloaded pixel fonts etc and just never been able to fix it. Results have been at best hit and miss.

    Your advice re zeroing the XY co-ordinates has fixed that (and it's Oh So obvious now...why didn't I think of that?) . So all is not lost...I have solved a major issue thanks to your advice.

    Thanks,
    Patrick

 

 

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
  •