Questions tagged [wmf]

A Windows metafile (WMF) consists of a collection of records that can store an image. The stored image can be rendered by parsing and processing the metafile structure.

A Windows metafile (WMF) is a vector image file format which consists of a collection of records that can store an image. The stored image can be rendered by parsing and processing the metafile structure.

The Windows metafile begins with a header record, which may include the version of the metafile, its size, and the maximum number of objects that are defined. A metafile with its records defines the steps to read the final image and hence can be "played back" when its records are converted to graphics commands and executed by a graphics API to render the image.

93 questions
0
votes
0 answers

Is there a way to load .wmf images in Unity with C#?

I have a SQLite DB full of images I need to display in Unity. The files are stored as BLOBs and I can read the data from the DB and store it as a byte array in my C# scripts. Unfortunately all the images are in a file format I didn't even know…
peaceoutside
  • 942
  • 7
  • 12
0
votes
3 answers

Metadata in wmf file?

Is there a way to store and retrieve custom metadata in a wmf file, please notice that i don't mean Windows Media Format? Optional using .net and C# ?
Karsten
  • 8,015
  • 8
  • 48
  • 83
0
votes
1 answer

Is there a library to render Windows metafiles to a cairo surface?

I'm trying to implement a PDF output target in an existing application which uses Windows metafiles (specifically, Aldus Placeable Metafiles) as one of its inputs. Is there a pre-existing library to render such metafiles to a cairo surface (or some…
bdonlan
  • 224,562
  • 31
  • 268
  • 324
0
votes
1 answer

iText7 WmfImage from byte array throws IO Exception

can someone please confirm this is a bug? Loading a WMF file as WmfImage from a file (see code, method 1) works, but loading it from a byte array (method 2) fails. PdfWriter writer = new PdfWriter(dest); PdfDocument pdf = new…
JorisJ1
  • 922
  • 2
  • 12
  • 22
0
votes
2 answers

Delphi cannot open WMF file?

I am using Delphi XE3. I try to open a WMF file, with the following code: var Picture: TPicture; begin Picture := TPicture.Create(); Picture.LoadFromFile('E:\temp\thumbnail.wmf'); Picture.Free; end; …
tempc
  • 1
  • 1
0
votes
1 answer

What governs DC scaling?

This code gets different scaling depending on which computer I run it on. Metafile image; IntPtr dib; var memoryHdc = Win32Utils.CreateMemoryHdc(IntPtr.Zero, 1, 1, out dib); try { image = new…
Peter Wone
  • 17,965
  • 12
  • 82
  • 134
0
votes
1 answer

C# Remove color using Graphics

I'm looking to remove all color from WMF image file by only 1 color. Metafile img = new Metafile(path + strFilename + ".wmf"); float planScale = 0.06615f; float scale = 1200f / (float)img.Width; planScale = planScale / scale; ; float widht =…
0
votes
0 answers

c# iTextSharp converting WMF to PDF embedding fonts

I am fairly new to C#, but am using it to convert some older files in a WMF/PMF format to PDF. I have the script working, but some of the fonts in the original document are not coming through. For example, some of these old documents are payroll…
e.Rock
  • 1
  • 2
0
votes
1 answer

convert wmf to jpg with graphicsmagick, unable to read font

I try to convert a wmf file into a jpg. gm says it is "Unable to read font (n021004l.pfb) [No such file or directory]." My command is like that: gm convert 456.wmf 456.jpg What could be wrong? I am using the latest gm version 1.3.29 and have…
gufidown
  • 82
  • 1
  • 8
0
votes
1 answer

convert wmf to jpg with graphicsmagick produces black image

I have a wmf file (extracted thumbnail from an Excel file) which I want to convert to a jpg using the following graphicsmagick command: gm.exe convert 123.wmf 123.jpg The result is a black square. (the same happens if I try to open the file with…
gufidown
  • 82
  • 1
  • 8
0
votes
1 answer

C# MetaFiles(WMF) detect different dimensions in 2 different Applications

I created a console application and a MVC-Website. On both are the exact code of Loading Metafiles like WMF. I want to detect the size of these files. System.Drawing.Image imgFile= System.Drawing.Image.FromFile(mfFile); int pixelWidth =…
Cobi
  • 105
  • 1
  • 2
  • 10
0
votes
1 answer

Reading a WMF header with WINAPI

I can't seem to find anywhere how I can read the header of a .wmf file with C/C++ and the Win32 API. Can anyone give me some pointers and/or an example? I have a C++ application that must be able to recognize whether some chunk of binary data is a…
jfronner
  • 19
  • 1
  • 2
0
votes
1 answer

Convert an Image

I Tried to convert this code into vb.net and add a little code to make a file... but the file's resolution became crap and i cant seem to insert it into the Crystal report, Did i do something wrong while converting it into vb.net? thanks in advance…
Orion Star
  • 1
  • 1
  • 5
0
votes
0 answers

How to create word file with adding wmf files as embedded equations by POI?

Envirment: word2007 on windows7. I parse a word(.docx) file by using the latest Apache POI library(3.16), and exact the texts, pictures and embedded mathtype equations successfully. To parse the embedded mathtype equations, I used the following…
five
  • 1
  • 2
0
votes
2 answers

How to save a MS Chart in WMF format and insert in the PDF iTextSharp

I've been working in an ASP.NET MVC application (C#) in Visual Studio 2012. I've created several reports with MS Charts (to show them in a pdf file I've used iTextSharp). But, my charts have a very bad quality when they're zoomed on 200%. Because of…
alenan2016
  • 13
  • 6