How to Convert .Gif image into .Jpg in windows phone using C# - windows-phone-7

i want to convert .gif image in .jpg using C# in windows phone
Application.

I don't think there is any provision directly to use a .gif image. But one way is to get all the key images for animation and create a storyboard or you can use third party tools.
First download the image(any) using Httprequest or Webclient and then convert to jpg or png from gif(if it is gif) in the following way.
GifDecoder gd = new GifDecoder();
ImageTools.ExtendedImage img = new ImageTools.ExtendedImage();
gd.Decode(img, stream); //stream means image stream
PngEncoder png = new PngEncoder();
png.Encode(img, isoFileStreamdownload); //isoFileStreamdownload means stream, which is used to save image in image file like(image.png))
using ImageTools.dll, ImageTools.IO.Gif.dll,ImageTools.IO.Png.dll (Images Tools)
You can get the dll files from codeplex or just google it.

Related

How to add GIF file in Xcode assets foler?

I'm using Xcode 12.4 and I want to use GIF image in my app.
So I put GIF Image in Assets.xcassets folder.
But UIImage can't recognize the GIF file with this error message
CoreUI: attempting to lookup a named image 'imgname' with a type that is not a data type in the AssetCatalog
When I open Assets.xcassets folder in xcode, the file is represented like above image.
How to solve this error? I use code to get image
UIImage.animatedImage(with: [UIImage(named: "img_name")!], duration: 15.0)
Thank you.
That's because UIImage is not support file in data set.
You must use NSDataAsset to load gif data from data set

How to open image file using pdftron

I want to load an image file using the pdftron webviewer api.
For pdf files it's working fine but I want to load image files and add annotations to them.
In the user guide there is no information regarding working with images.
Yes, WebViewer can do this out of the box.
There are a number of image formats supported. Here is the breakdown.
PNG, JPEG
Simply pass the image URL to WebViewer initialDoc constructor parameter, or to WebViewer.loadDocument().
If your URL does not have a proper file extension, then you can do the following.
myWebViewer.loadDocument("mydomain/generic_url_to_image", {filename: "input.png"})
This works with both PDFNetJS Lean and Full editions.
TIFF, GIF, BMP
You can utilize the browser's HTML5 canvas to load the images, and then generate PNG/JPG from the HTML5 canvas, and then pass the follow the instructions above.
JP2 or multiple images in one document.
Using PDFNetJS Full edition, which does not come with the standard WebViewer download, you have full control over PDF creation.
PDFNetJS Full Download: http://pdftron.com/downloads/PDFNetJS.zip
Using PDFNetJS Full you would follow the AddImage sample code to construct a PDF with the image(s) in it.
http://pdftron.com/webviewer/pdfnetjs/config.html#file=samples/PDFNet/AddImageTest/AddImageTest.js

Magento Gif upload

I try to upload gif from admin panel of Magento2 for a feature, but it is not looping gif but a jpg at the frontend.
Looking for your advices which is also ok for Cache
Why dosent the uploaded Gif animated ? why isnt it looping ?
When you upload images to Magento i the Wysiwyg editor. it "prepares" your images for frontend. By doing so a version of the image is stored in cache preparation.
The function that handles this is not compatible with the .gif format, and therefore i takes the first image in the row of images contained in the .gif file.
You can upload you image with a FTP client like Filezilla or through Cpanel, and overwrite the gif you already uploaded. that way the function is not run on your file, and you will keep your animated image.
There is also modules that makes the Wysiwyg editor compatible with the .gif format, for more permanent soloutions.

Grails - Save a svg image in the project public folder as JPG image

I have a Groovy/Grails web app and I need to save a SVG image in the public folder of the my project (web-app/images/upload) as an image (JPG, PNG). So how I can do that?
Now I can convert SVG to base64, I think is easier save a base64 than save a SVG.
You can use Apache Batik library.
This looks like a fine example and nicely explained.

Blackberry - How to retrieve images from a zip resource file?

I am using eclipse & JDE to develop Blackberry Application. I compressed a folder which has set of images in .jpg and .png formats. Please help me, how to retrieve images form the zipped file?
Thank you.....
I can't see any reason to compress compressed graphic format. Anyway it can't be efficient. It's better to add all images to progect img folder and use them as a resources from code:
Bitmap bmp = Bitmap.getBitmapResource("image.png");

Resources