I have a number of images that I would like to append to each other to make a larger file.
I am not sure of the best way to do this and I am looking for suggestions. The resulting image would be either printed, saved to a file or copied to the clipboard.
Save them as one tiff file have look to thisSave images into a multi-page TIFF file or add images to an existing TIFF file
Related
I use C# to turn ppt files into jpg images but I also want the program to resave the same ppt with compressed pictures and cropped pictures, I want to use settings in Tools menu when saving a file. How can I access them with Microsoft.Office.Interop.PowerPoint?
Sorry, I should clarify. I want to re-save the same ppt but with those settings of compression and cropping. Basically, I want to resave the ppt file and then break it into images. I need a ppt with compressed images in order to save space on the pc.
Right now I use this to save JPGs.
file.SaveCopyAs(outputPath + "CONVERTED.jpg", PowerPoint.PpSaveAsFileType.ppSaveAsJPG, MsoTriState.msoTrue);
I may have an answer for you:
In the PPTX file's PPT folder, you'll find a presProps.xml file.
In it, you'll find something like this:
<p:extLst>
<p:ext uri="{E76CE94A-603C-4142-B9EB-6D1370010A27}">
<p14:discardImageEditData xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="0"/>
</p:ext>
<p:ext uri="{D31A062A-798A-4329-ABDD-BBA856620510}">
<p14:defaultImageDpi xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="96"/>
</p:ext>
<p:ext uri="{FD5EFAAD-0ECE-453E-9831-46B23BE46B34}">
<p15:chartTrackingRefBased xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main" val="1"/>
</p:ext>
</p:extLst>
From this, it appears that you could save a copy of the PPTX, change defaultImageDPI and possibly discardImageEditData in the XML, re-open and resave the PPTX from PPT.
It doesn't seem to allow values below 96dpi; set it lower and it reverts to 96 when you open the file in PPT.
I have hundreds of thousands raster (scanned) image files, all saved without a file extension. The files are in various formats (.jpg, .bmp, .tif, .png, .pdf, .gif ...etc.). I need to find all the .tif files without reading the entire contents of each file. Excluding some types is easy, e.g. open a file, read the first line, exclude if it contains "PDF". However, because I do not have an exhaustive list of possible file types I need to positively identify .tif files. Can this be done using C#?
I have a requirement to save ~1-5 tiff images with a maximum size of roughly 10MB each. Each file will have it's own metadata file which contains serialized classes. I also need to house another XML file for quick access to important data about the file (potentially to search and sort the images and tell the software how to interact with the image).
What would be the most efficient and fastest to load/save all this data?
I was thinking possibly using a multi-paged tiff file where each page has it's own metadata file and xml file, the problem being that would be one huge tiff file and possibly very slow to load and save.
Would it be better to separate the metadata and xml from the file itself? If so then I could possibly combine the metadata and xml files. Or should I not use a multi-page tiff and create multiple tiff files in a folder structure?
Any help appreciated...
I'm trying to figure out a way to embed an image into a file in c#.
What I'm doing is to create a file with text inside of it (it uses XML) , and I want a quite big image embedded into it which I then can read from the file along with the XML.
But how do I do that?
I can't put an image file along with the file since the file may be used on different computers and I don't want 100's of image files laying around with the files.
Any ideas would be appreciated!
I have an image folder which contains .tif image and when the user search for an image the image must be .png or .jpeg file extension to avoid browser incompatibilities while display .tif images. How can i do that? Please, notice that the images are save in a directory, not in a database.
TIFF, or "Tag Image File Format", is a raw file format with little or no compression. PNG and JPEG are both compressed formats.
You're going to have to find a way to write PNG & JPEG files or install some SDK plugin to do this.
You can't just change the extension and display a TIF as one of these compressed formats.
Links provided for WIKI references.
Hope that helps.