Results 1 to 24 of 24

Thread: [RESOLVED] How can I change by EMF byte array to jpeg file?

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2015
    Posts
    343

    Resolved [RESOLVED] How can I change by EMF byte array to jpeg file?

    should anyone show me a demo...
    i have been confused for long time.

    in post 14, dilettante kindly provided a demo of Load emf byte to a PictureBox and then save to jpeg file from the PictureBox

    that is a good demo, thanks dilettante, really.

    But i m a little puzzled, is there any more method of this converting

    like create a memory device context and then play emf bytes on it

    and then save as other types of picture.

    like Lavolpe said at this link: http://www.vbforums.com/showthread.php?640973

    1. Create blank EMF using desktop DC: GdipRecordMetafileStream
    2. Get EMF graphics: GdipGetImageGraphicsContext
    3. [added] Get previously created Region object & apply to graphics: GdipSetClipRegion
    4. Draw 24bpp source to EMF: GdipDrawImageRectRect
    5. Convert EMF to windows EMF: GdipGetHemfFromMetafile
    6. Convert EMF bits to WMF: GdipEmfToWmfBits
    7. Write bits to file & clean up
    maybe i will do some work at the base of dilettante's demo...

    question resolved.
    Last edited by loquat; Nov 20th, 2016 at 05:45 AM. Reason: Resolved by dilettante

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width