Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. MetaFIle

MetaFIle

Scheduled Pinned Locked Moved C#
graphicsperformancehelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    felopater
    wrote on last edited by
    #1

    hi all, Listen i got a problem and i don't know it's cause. when i run that piece of code: grf = Graphics.FromImage(metafile); //do what ever i want with grf grf.Dispose(); grf = Graphics.FromImage(metafile); i got an out of memory exception. i realized that if i created a graphic object twice from metafile i got that exception.by the way when i use normal image not metafile it works. i wanna know why that with metafiles? marcoryos

    L 1 Reply Last reply
    0
    • F felopater

      hi all, Listen i got a problem and i don't know it's cause. when i run that piece of code: grf = Graphics.FromImage(metafile); //do what ever i want with grf grf.Dispose(); grf = Graphics.FromImage(metafile); i got an out of memory exception. i realized that if i created a graphic object twice from metafile i got that exception.by the way when i use normal image not metafile it works. i wanna know why that with metafiles? marcoryos

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      This is a common GDI+ error. I think you need dispose & 'reload' the metafile OR NOT call dispose on grf. Silly isnt it.... xacc.ide-0.1.1.4 - now with LSharp integration and scripting :)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups