Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Picture problems

edited February 2006 in General
We are using RB 9 (although I have recently installed the Trial of RB 10 and
its not fixing the problem either)...
Delphi 7...

Our graphic is being built in code, so theres no actual report component on
the form...

When we print photos inside a specified border size of 4x6 (or any size
really, it does the same thing on our photo boxes that are 3x5.5), the image
is slightly distorted...in the roofs of houses there is quite a bit of
distortion...if you print a picture of the exact same size in Publisher it
works fine..

I have set DirectDraw to True...and Stretch has been set to both True and
not True.

Any ideas?

--Brandie

--
******************************************
Brandie VanNort
Computer Services Administrator
Ebby Halliday, Realtors
Dallas, Texas
http://www.ebbyhalliday.com
Phil 4:13 "I can do all things through
Christ who strengthens me"
******************************************

Comments

  • edited March 2006
    Hi Brandie,

    Try setting the MaintainAspectRatio property of the image to True. This
    shoud keep the image proportionally valid regardless the size of the image
    box. If this does not help the issue, please give me the exact steps I can
    take to recreate this behavior or perhaps send a small example in .zip
    format to support@digital-metaphors.com.

    Unfortunately ReportBuilder's image processing capabilities are not as
    advanced as other imaging suites. It may also be a good idea to process the
    images initially with an advanced image application before adding it to a
    report.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Nico...MaintainAspectRatio doesn't work because the picture has a set
    dimension that we have to fit ANY size photo into...

    For instance...if the endusers choose a 4x6 graphic...then whatever size
    photo they have, gets shoved into a 4x6 area. We've tried working with our
    endusers to get them to work on the photos and get them as close to the
    aspect ratio as possible so that there is less distortion, but theres still
    quite a bit.

    We use With TppImage.Create(aBand) Do begin to add the image into the
    report.

    And then:

    Band := aBand;

    SetBounds(InchesToScreenPixels(qryGfxPics.FieldByName('pos_left').AsFloat),
    InchesToScreenPixels(qryGfxPics.FieldByName('pos_top').AsFloat),
    InchesToScreenPixels(qryGfxPics.FieldByName('pos_width').AsFloat),
    InchesToScreenPixels(qryGfxPics.FieldByName('pos_height').AsFloat));

    SetCurrentDir(ExtractFileDir(Application.ExeName));

    h :=
    InchesToScreenPixels(qryGfxPics.FieldByName('pos_height').AsFloat);
    w :=
    InchesToScreenPixels(qryGfxPics.FieldByName('pos_width').AsFloat);
    Picture.LoadFromFile(ScalePhoto(GetCurrentDir +
    GetFullImage(qryGfxPics.FieldByName('pic_id').AsInteger), w, h));

    DirectDraw := True;

    if chkFitToFrame.Checked then
    Stretch := True;


    In the instance of the 4x6 graphic...the pos_height and pos_width would be
    getting set to 4 and 6...

    --Brandie

    --
    ******************************************
    Brandie VanNort
    Computer Services Administrator
    Ebby Halliday, Realtors
    Dallas, Texas
    http://www.ebbyhalliday.com
    Phil 4:13 "I can do all things through
    Christ who strengthens me"
    ******************************************

  • edited March 2006
    Hi Brandie,

    I'm sorry, but I am having a hard time understanding what you would like to
    happen. If you try to fit a 5 x 5 image into a space 4 x 6, you will of
    course get some distortion unless you shrink the image to 4 x 4 (which would
    be the effect of setting the MaintainAspectRatio to True). I'm unclear
    about where you are actually assigning the image to the TppImage object and
    why setting MaintainAspectRatio will not work in your case. This property
    has nothing to do with the TppImage component's bounds, only the internal
    image.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.