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

jpeg colours messed up

edited March 2008 in General
Hi,

Delphi 6 update 2 & RB 10.07 Standard.

I'm trying to print jpeg images in a report. The problem is that the
colours are all messed up, both at design time, at run time in the
preview window and on the printed copy. This occurs both for TppImage
components and TppDBImage components.

In D6, for use on forms, it seems that TDBImage only supports
bitmaps, so I'm using TJvDBImagen from JVCL 3.1 instead, connected to
the image field of my database, and that displays the pictures
correctly..

Could anyone advise me on how to fix this problem?

Thanks,
Richard

Comments

  • edited March 2008
    Hi Richard,

    Try adding ppJPEG to your uses clause. This will enable jpeg images for the
    DBImage component.

    This is not a known issue. Are you able to successfully see the image using
    a standard TImage component in Delphi?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2008
    Thank you for your reply Nico,


    I'd already done that, without it I got a 'Cannot generate report'
    message.


    The problem arose when I was building and running the application on
    an NT4 sp6 workstation. Today, I've complied & run the exact same
    source on both Win 2000 and XP machines, and the image displays
    correctly in both cases. I can't check the printed output today, but
    on printing to a pdf the result is fine.


    Using the machines I have access to today (2000 & XP), yes.

    So it seems it's a problem with NT. If the runtime picture is messed
    up, does that necessarily mean that the printed hard copy will be
    messed up?

    Richard
  • edited March 2008
    Hi Richard,

    Generally the preview and the printed output will match. Where are you
    storing these images (i.e. which database) and which connection type are
    you using to access them? If you save these images to your hard disk and
    try to load them from file, do you still get the same results on the NT
    machine?

    --
    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.