Questions tagged [metafile]

A generic term for a file format that can store multiple types of data. This commonly includes graphics file formats, which can contain raster, vector, and type data.

A generic term for a file format that can store multiple types of data. This commonly includes graphics file formats, which can contain raster, vector, and type data.

106 questions
12
votes
4 answers

Specifying DPI of a GDI Device Context

I have an application that generates metafiles (EMFs). It uses the reference device (aka the screen) to render these metafiles, so the DPI of the metafile changes depending on what machine the code is running on. Let's say my code is intending to…
Nicholas Piasecki
  • 25,203
  • 5
  • 80
  • 91
11
votes
2 answers

How to display Windows Metafile?

I need to display a Windows Metafile (EMF) using WPF, how can I do? Edit: I'd to keep the image vector-based.
gliderkite
  • 8,828
  • 6
  • 44
  • 80
8
votes
2 answers

Printing a Local Report without Preview - Stream size exceeded or A generic error occurred in GDI+ C#

I am using this article to print my rdlc directly to printer but when I am trying to create Metafile object by passing stream it gives me error. (A generic error occurred in GDI+) Code: using System; using System.IO; using System.Data; …
3 rules
  • 1,359
  • 3
  • 26
  • 54
8
votes
2 answers

How to draw a PNG transparently on a TMetaFileCanvas

I need to draw a PNG transparently onto a MetaFileCanvas. This works fine when I draw to a bitmap (which I use when displaying on screen), but for printing I need a MetaFile. How can I achieve this? Here's some code that demonstrates the problem.…
Svein Bringsli
  • 5,640
  • 7
  • 41
  • 73
7
votes
2 answers

Copying a graphic to a TMetaFileCanvas outside the screen dimensions

We have a problem with the TMetaFileCanvas output when drawing an image to a coordinate outside of the screen resolution. Vector operations seem to have no issues but image operations are just "ignored". If we draw the same image to a coordinate…
Graymatter
  • 6,529
  • 2
  • 30
  • 50
7
votes
2 answers

Vector graphics clipboard format for Qt

I want my Qt application to be able to save simple vector graphics to clipboard in a compatible way. On windows I want to be able to paste the graphics into Microsoft Word or Powerpoint. On Linux I want to be compatible with the Open Office. Which…
danatel
  • 4,844
  • 11
  • 48
  • 62
5
votes
1 answer

Unity metafiles errors

I know the title may sound imprecise but that is because i'm not sure where my error comes from... First, here's my folder organization : Assets Scenes Scripts MemoryCard.cs SceneController.cs Sprites At start, the file "MemoryCard" was…
Axel Samyn
  • 103
  • 2
  • 10
5
votes
1 answer

How to enable anti-aliasing when rendering WMF to BitMap in C#/WPF/WinForms?

Why won't lines etc be anti-aliased when doing this? using (var myGraphics = Graphics.FromImage(bitmap)) { myGraphics.CompositingQuality = CompositingQuality.HighQuality; myGraphics.SmoothingMode =…
Macke
  • 24,812
  • 7
  • 82
  • 118
4
votes
3 answers

How to Convert a Metafile to Image by Drag'n'Droping in a Winform

I develop a Winform Application with the framlework .NET 3.5 in C#. I would like to allow the user to drag&drop a picture from Word 2007. Basically the user open the docx, select a picture and drag&drop them to my PictureBox. I've already done the…
Joss
  • 41
  • 3
3
votes
1 answer

Change spacing between legend border and legend title

I am attempting to save a plot as a metafile (*.emf) using RStudio. The formatting of the plot looks okay in the *.emf file except that there is no gap between the top border of the legend and the legend title. How can I add such a gap? I am…
Mark Miller
  • 12,483
  • 23
  • 78
  • 132
3
votes
0 answers

Deserializing Metafile

I have an application that works with Enhanced Metafiles. I am able to create them, save them to disk as .emf and load them again no problem. I do this by using the gdi32.dll methods and the DLLImport attribute. However, to enable Version Tolerant…
Kildareflare
  • 4,590
  • 5
  • 51
  • 65
3
votes
1 answer

How to change dimensions of metafile figure output in Rmarkdown?

I have a client who would like to use Rmarkdown to make figures into a Word Document and then edit them (I know... not really the point of reproducible research, but it's what the client wants...) ---- title: "MinReproEx_Metafile" author:…
emudrak
  • 789
  • 8
  • 25
3
votes
2 answers

"Parameter Not Valid" on call to GetHenhmetafile(), trying to save an in-memory Graphics object as EMF

I've searched in vain for the last two weeks for an answer to this one, but I'm stumped. I'm working with some code that creates a sample image from a Graphics object constructed from a metafile, all residing in a memory stream in order to avoid the…
Greg Gauthier
  • 1,336
  • 1
  • 12
  • 25
3
votes
3 answers

Is it possible to rotate the metafile image without converting it to the bitmap?

I need to rotate the TMetafile image, at least by 90 degrees step. It is easy to rotate it by drawing my metafile on a bitmap canvas and then rotating the bitmap, but I would prefer to keep it in vector image format. Is this possible at all? If…
Andrew
  • 3,696
  • 3
  • 40
  • 71
3
votes
1 answer

Blurred text when converting Windows metafile to bitmap in Delphi XE2

I am working on a program in Delphi XE2 which needs to be able to convert Windows enhanced metafiles to bitmaps. The following code is used to perform the conversion: procedure TForm1.Button8Click(Sender: TObject); var Bitmap : TBitmap; Metafile…
Tim
  • 375
  • 1
  • 4
  • 18
1
2 3 4 5 6 7 8