locked
JPEG image over Tranparent Image problem RRS feed

  • Question

  • User-1673888866 posted
    Hi,
    I am just started my career as a developer few months back  and I am in my first project and I am struck. Please help.
    I am developing  a website with asp.net and C#

    In one of the web page, in an Image control, I have to display an image over an other image which I sucessfully did with various code articles help from the web. Now, in one scenario I have to place a smaller image first. Then over that I have to place a gif image(in which there is a circle transparent area). It is something like placing a photo in a photoframe. With some help from the web, I am able to display the gif image as transparent. But using Graphics.DrawImage when I combine the bottom image and then the gif image, the combined image comes out as a bad quality picture. Can anyone help on how to achieve something like a photo inside a photo frame, photo inside a clock. Pls pls help.

    Regards,
    Swami

    Thursday, December 22, 2005 5:38 AM

All replies

  • User2128074059 posted

    Hi,

    By your ideas, I think you can save the combined image with JPEG format. And the effect is very perfect.

    You can get a bad quality when you save a GIF image with GDI+. The reason is that GDI+ use halftone to processing GIF image. So you must create a color palette by yourself to save your image.

    Thanks for your email and trusting me.

    Thursday, December 22, 2005 9:47 PM
  • User-1673888866 posted
    Hi,
    Thanks for your reply.

    I tried it. But as soon as I place the jpg with the transparent gif, the combined pictures gets worse quality.
    I really needs the top image to be transparent gif because if take an example of clock, the middle area where the time is getting displayed has to be transparent except the three needles(hour needle, minute needle, seconds needle) and the jpg image has to be filled in the transparent area in such a way that the three needles will be over it. I really got confused. Can you pls help me if possible with some code??


    Regards,
    Swami

    Thursday, December 22, 2005 10:59 PM
  • User2128074059 posted

    Can you give me the JPEG and GIF images?

    Friday, December 23, 2005 12:03 AM
  • User-1673888866 posted
    Hi,
    Thanks for your reply. I have sent you the email(hotmail id) with the both the files attached.

    Awaiting your response.

    Regards,
    Swami

    Friday, December 23, 2005 12:33 AM