image-conversion

How to Get UIImage from a 'Base64String' format raw image data, on iPhone?

冷暖自知 提交于 2019-12-09 03:23:09
问题 In my application, I receive the image data from the server in a XML file. This data is of an image( .jpeg or .png or .tiff etc) which the server, converts into 'Base64String' format bytes to send to my application through the XML file. At my application side, the application stores these bytes, in the form of 'NSData' into a database. Now, my application has to retrieve and show up the image at the later part. But I haven't been able to figure out how to get the UIImage from this

How to convert a pdf to an image?

爷,独闯天下 提交于 2019-12-08 17:07:58
问题 Using pdfbox displays an error: import java.awt import javax` Based on the following code: imageType = BufferedImage.TYPE_INT_ARGB; //need to specifies java.awt String[] formats = ImageIO.getReaderFormatNames(); //need to specifies javax 回答1: Finally i found the solution. We can't use awt with Android, so, finally go for the pdf viewver lib on http://sourceforge.net/projects/andpdf/files/ Find out the apk and also source for pdf to image. Here is myclass to convert pdf to image: package com

Convert a List of Images to a GIf

假装没事ソ 提交于 2019-12-08 12:00:16
问题 I am currently trying to construct a GIF image from a source image strip, and I am catching the following exception error: System.Runtime.InteropServices.ExternalException (0x80004005): A genereric error occurred in GDI+. At ... line 55. At ... line 138. The code I am using takes 2 user inputted file paths from the console to allow the user to select which image is used as the source, and to define a path for the new file. The problem is that I keep getting exception errors that I can't make

Converting an HEIC image to Jpg and upload to the Server in Xamarin iOS

て烟熏妆下的殇ゞ 提交于 2019-12-08 09:32:58
问题 I am trying to convert the HEIC image to Jpg from below code in using Dependency Service and trying to display with Image and uploading to Web API.. But both are not working, Is it a correct way of doing HEIC conversion to Jpg? if not please suggest me how to achieve this. Dependency Service method: public byte[] GetJpgFromHEIC(string path) { byte[] imageAsBytes = File.ReadAllBytes(path); UIImage images = new UIImage(NSData.FromArray(imageAsBytes)); byte[] bytes = images.AsJPEG().ToArray(); /

How to create a Byte array that contains a real Image?

元气小坏坏 提交于 2019-12-08 02:43:23
问题 Please see my code below. I want to create a Byte array with data that I can convert into a real image. When I try to run this code I get an argumentException. What do I need to do in the For loop in order to create a legitimate Byte array that will hold data of an image? I don't want to use a real image and convert it to byte array, I want to create an image form random numbers. Random Rnd = new Random(); public MainWindow() { InitializeComponent(); } private void Button_Click_1(object

Convert UIImage to tiff/tif file

无人久伴 提交于 2019-12-07 15:18:42
问题 In my iPhone app, I need to convert UIImage to tiff/tif file for calling some API with tif type of parameter. So I'm supposed to get the UIImage from iphone photo library or taking a photo from camera. Please let me know whether this conversion (UIImage to tif/tiff) is possible and if possible what would be the best way to do it. Thanks in advance. 回答1: ImageMagick runs on iOS and seems to fit the bill. However, I would consider modifying the API, assuming you have access to it. If the

How to create a Byte array that contains a real Image?

寵の児 提交于 2019-12-06 10:37:54
Please see my code below. I want to create a Byte array with data that I can convert into a real image. When I try to run this code I get an argumentException. What do I need to do in the For loop in order to create a legitimate Byte array that will hold data of an image? I don't want to use a real image and convert it to byte array, I want to create an image form random numbers. Random Rnd = new Random(); public MainWindow() { InitializeComponent(); } private void Button_Click_1(object sender, RoutedEventArgs e) { Byte[] ByteArray = new Byte[1000]; for (int i = 0; i < 1000; i++) { ByteArray[i

How to convert PNG to BMP at runtime?

帅比萌擦擦* 提交于 2019-12-05 23:05:13
I need to convert PNG file to BMP file on runtime. I can't do it like Image dummy = Image.FromFile("image.png"); dummy.Save("image.bmp", ImageFormat.Bmp); because i can't save the bmp image on the local disk as a file. Thanks for any help. You can save to stream using(MemoryStream stream = new MemoryStream()) { Dummy.Save(stream, ImageFormat.Bmp); } sgokhales Precise answer given here. Image Dummy = Image.FromFile("image.png"); Dummy.Save("image.bmp", ImageFormat.Bmp); Since you don't want to follow this method, you can do it the way Stecya answered. Just do it this way. Stream stream; Dummy

Can an SVG vector graphic be converted to a PNG file format for use in Fireworks?

匆匆过客 提交于 2019-12-05 08:55:45
As many of you know, there are quite a few websites that sell royalty free graphics. Some sites sell vector graphics (svg) or give you the option to download them as such. I don't have a graphics editor that will support SVG. Currently, I'm working with an older version of Fireworks. I cannot open a SVG file type. (I also cannot afford to purchase PhotoShop or Illustrator software). I'm running Windows on my PC. Questions : What are my options? Is there a SVG to PNG converter? Would the converted file retain everything correctly? Would I be able to work with the converted SVG file as I do a

How do I convert images (PSD, AI and EPS) to PDF?

霸气de小男生 提交于 2019-12-03 16:21:01
Customers of my Django site can upload a print design in: PDF, PSD, AI and EPS. If the filetype they upload is not PDF I want to convert it to PDF. So my question is: How do I convert Photoshop, Illustrator and CorelDraw files to PDF (programmatically)? I tried UniConvertor but it: does not support PSD, distorted my AI inputs, and rejected my EPS inputs . Know any workarounds? I am open to running separate scripts for each filetype. I googled "psd to pdf" but the results all looked like spam. (It seems image conversion is a cottage industry.) Ideally I want open-source but I will take what I