Working with CGM version 4 files? - converters

My local government requires the use of ActiveCGM (which I believe is a form of CGM file format, version 4) for viewing technical documents.
The standard is well-documented but the idea of reading and implementing a 449 page specification sounds like a non-starter to me. Unfortunately, I can't find any decent tool for converting CGM v4 to a modern file format.
I don't mind losing active elements (such as hover) in the conversion process but I need to retain static elements (such as vectors and text) because I need to parse measurements embedded in the document.
How do I access CGM v4 in a programmatic manner, or convert it to a more recent file format?

You can use jcgm frame with Apache FOP.
With a little bit xsl and java coding effort,
you can convert XML+CGM documents to PDF files
jcgm can convert CGM files to standart graphic formats like
jpg, png, etc.
There are some samples in jcgm documentation...
Jcgm is an Apache project and It is 90% accurate..
Bkapan...

Related

hwpf, xwpf, hssf, and xslf poi picture extraction

I'm looking to extract all images from new and legacy Word documents and spreadsheets to assist in a real time document classification system, and looking at the documentation, I seem to have run into a problem. I'm having no problems finding documentation within the hwpf module and packages for extracting images from the file, but when it comes to the other 3, it seems as though they don't support the same methods.
What I want to do is to have one block of code that is document type agnostic when it comes to the 4 above mentioned types, I just want fast, easy access to the pictures in the files so I can move on to my next task, but at this point it looks like only the hwpf module supports extraction of pictures or the methods in 'PicturesTable'.
I'm also somewhat concerned about the performance of the library: it looks like it loads the entire file when all I want to do is scrape the images out of it. Any suggestions on a library that operates directly on the 'Data' bytestream and the folder structure of the .***x zip files?
I've already tried using OLEtools to try to extract pictures from the streams, and I'm now moving on to this tool. I havn't tried any tools that operate on the lower levels of the documents yet though.

How to convert image to integer array? (do not use any non-standard library)

How to convert image.png or image.bmp to integer array? (do not use any non-standard library)
Please ignore chunks that are not directly related to image data.(IHDR、IEND...etc.)
thank you very much.
SOLVED: I should use binary I/O function in stdio.h to read image file. thanks
If you have to read images into arrays without any image processing libraries you need two things:
You need means to read files in general.
You need to know the internal structure of the file formats you want to read.
So for png refer to https://www.w3.org/TR/2003/REC-PNG-20031110/
This document will tell you where to find the image dimensions, pixel data and other features. It's basically a manual for software developers on how to use this standard format properly.
Some image formats will require additional work like decrompression.

Are tags part of JPEG file?

I have a winodws 8 Laptop. If I put tags in my jpegs, can I use these tags to search jpeg files on other windows / linux machines? Or I have to use specific application to do so.
For some background. JPEG does not define a file format. There are a number of file formats that have been defined for JPEG images. JFIF, SPIFF, ADOBE, and EXIF are examples of such formats.
The JPEG standard defines APP0-APPF (hex) markers for applications to store metadata. Their structure is not defined by JPEG. The various file formats use some of these markers. The rest can be used by applications.
The EXIF format defines various tags that you can use with that format.
JFIF does not have tags but has some limited metadata.
The answer then is that the various file formats allow the storage of metadata either within their own structures, tags, or unreserved APPn markers.
The problem you face is that the applications need to be able to read the metadata that you write.
Tags are supported by the JPEG format. Windows 8 supports the standard. You will be able to use these tags on other Windows and Linux machines.
For more information, you can see this post: http://beckustech.wordpress.com/2013/03/12/tagging-jpeg-image-files/

How can I convert a extremly big .dat file to Image files?(Like jpg or something)

I have a folder of image file which have been compressed into .dat file. Since the .dat files are extremly huge(They are the microscopic image of the organ.), I don't really know what kind of tools that I can use to convert it into jpeg file. So the best case would that the whole image is split up into pieces, and I can get all the pieces of the image.
The ".dat" file suffix is used broadly, so you'll need to specify more details on what format/source software created the original data. As a guess, from a quick search of ".dat" format microscopy, these tools looks like they might be applicable to your domain:
http://gwyddion.net/
or
http://www.openmicroscopy.org/site/products/bio-formats
If you can't find a library for the format/languages you are using, then you'll need to find documentation of the file format, and write a converter (at least, the reading portion of the converter - you can use something like libjpeg to handle the writing portion.)

ExpressionEngine: File Manager

I’m new to EE and trying to learn the basics. Some questions about the File Manager:
I upload a photo and put “cat, kitten” in the description. When I do a search for “kitten”, it finds the photo. But when I do a search for “cat”, I get nothing. Any ideas what’s going on?
The file metadata are: file title, file name, description, credit, and location. What if I wanted to add custom fields? How do I do that?
In the template files, how do I access a particular manipulation (I call this “rendition”) of an image? Say I define a rendition “thumbnail” to be 100x100. How do I access that particular rendition in a template?
Is there a way to randomize the file names of the files being uploaded?
After uploading an image and testing it against PageSpeed, it turns out that the image can still be optimized via losslessly compressing it. How can this problem be addressed?
Ah, the file manager. Not EE's brightest spot.
It would not surprise me if the search in the File Manager was not
very robust. I'd try more variations to narrow it down (what kind of
characters affect the results - commas, dashes, spaces, etc ... do
partial terms match?)
You cannot currently add custom metadata to files in the file manager.
Use this syntax: {field_name:rendition}, e.g.,
{my_image:thumbnail} (docs).
Nope.
EE just uses the GD library available in your PHP install to resize
images. If you want the highest possible optimization, you'll have
to do your image manipulations yourself.
Given your queries, I would suggest you have a look at Assets by Pixel and Tonic. It offers a far superior file management experience on most of these fronts.

Resources