Re: Bitmap + Clipboard + Transparency = Blue Background?



Again, using the same code I copied the PNG image to the clipboard using
the "PNG" format and tried to paste it into a Word2003 document. The
hourglass cursor appeared momentarily but no image was pasted into the
document.

I do not have access to Office 2003. I am unable to test your scenario.

Try this:
Insert your png into Word2003 and then crl-c to copy to the clipboard.
If the clipboard viewer shows the "PNG" clipboard format, then open Excel
2003 and try to paste the image.
If the "PNG" clipboard format is supported by Office 2003, then the paste
should succeed in any of their applications.

Additionally, you may try to create a test windows form application to test
the pasting of an image from the clipboard and additionally saving it as a
file.

If the test is successfull, then your code supports the copy and pasting of
the "PNG" clipboard format.

As I stated, you have no control whatsoever as to what a third party
application supports for image clipboard formats.

Adobe Photoshop supports their own private clipboard formats and so does
Microsoft. If your code, works then you are done!


"Christopher Ireland" <cireland@xxxxxxxxx> wrote in message
news:eBl2dqJoIHA.804@xxxxxxxxxxxxxxxxxxxxxxx
Michael,

Office 2003 may not support the "PNG" format. To test, copy a .png
image from Office 2003 and then check the clipboard viewer to see if
you see the "PNG" clipboard format.

Using code that I have already posted for the creation of a PNG image, I
saved that image to disk and then inserted it into a Word2003 document. I
then selected that image within the word document and did a Ctrl+C -
ClipBook Viewer showed the "PNG" format greyed in the list generated by
the "View" menu.

If so, then check your code to
see if you can paste the image.

Again, using the same code I copied the PNG image to the clipboard using
the "PNG" format and tried to paste it into a Word2003 document. The
hourglass cursor appeared momentarily but no image was pasted into the
document.

If you check the clipboard utility, then you will see that Ctrl+C is
in fact the same as a drag and drop of an image file.

Indeed, as I have already mentioned, the ClipBoard Viewer shows the format
as being "Drag-Drop Data". It seems that this clipboard data format is
capable of preserving the transparency of a PNG file. My question is how
to use the clipboard's "Drag-Drop Data" format in C#, given the lack of
success I've been experiencing with the "PNG" clipboard format.

I am happy to see that you have made progress and that your code is
now working.

Yes indeed, so am I. Thank you again for all your help so far!

--
Thank you,

Christopher Ireland
http://shunyata-kharg.doesntexist.com

"One man alone can be pretty dumb sometimes, but for real bona fide
stupidity, there ain't nothing can beat teamwork."
Edward Abbey



.



Relevant Pages

  • Re: Bitmap from Clipboard back to Clipboard as PNG?
    ... "PNG" format. ... MSPaint does not recognize the "PNG" format either. ... Your "PNG" image will be available on the clipboard. ... Dim lDataObject As New DataObject ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Bitmap + Clipboard + Transparency = Blue Background?
    ... c# to the clipboard using the "PNG" format to paste into either a Word2003 ... formats support "PNG". ... Your code correctly places the "PNG" clipboard format on to the clipboard. ... Windows Explorer and then Ctrl+V within Word2003. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: .PNG+ (Portable Network Graphics Plus) Files - No Support Anymore?? Help Appreciated!
    ... Essentially I'm looking for help with this file format in XP becuase it ... some other apps support PNG without the layering). ... Inkscape - http://www.inkscape.org/ Free, Vector graphics package. ... It came with a simple but nice image editing tool called Microsoft ...
    (microsoft.public.windowsxp.general)
  • Re: creating a .bmp file
    ... However the file seems to be saved in .png format, ... save it, but the act of compressing a ... but it produces a .bmp file wich has 'BM' as first 2 bytes. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Bitmap + Clipboard + Transparency = Blue Background?
    ... you see the "PNG" clipboard format. ... Using code that I have already posted for the creation of a PNG image, ... ClipBook Viewer showed the "PNG" format greyed in the list generated by the ... Indeed, as I have already mentioned, the ClipBoard Viewer shows the format ...
    (microsoft.public.dotnet.framework.drawing)

Loading