use actionscript to convert favicon to png? - actionscript-3

Using actionscript 3, how can I convert the favicon of a website to a 16x16 .png file?
this solution must specifically NOT access online services such as http://www.google.com/s2/favicons?domain=

The approach I would take is to bring in the ico file (assuming your favicons are ico files) as BitmapData. Then format the bitmap data as a PNG file. Here are some links I found to do just that. Alternatively, you could build your own solution but that would certainly be the long way round.
Importing ico files as bitmaps:
http://ntt.cc/2008/10/02/using-icodecoder-class-to-read-ico-file-and-display-it-as-bitmap-in-actionscript.html
Generating a PNG file from bitmap data:
http://www.kaourantin.net/2005/10/png-encoder-in-as3.html

Related

Can I convert .SVG animationfile to ,Json?

I'm trying to use Lottie Library in jetpack compose
For animating image, I made animating svg file.
But in https://lottiefiles.com/svg-to-lottie, the animating svg file converted to static json file which I didn't intent.
How could I convert animating svg file to animating json file?
You'll have use Adobe AE and convert your animation with lottiefiles or bodymovin extesions to .json.
Okey,
1- first open your .svg file with illustrator.
2- then you'll need to save the file as .ai (adobe illustrator).
3- after that you can open the .ai file with adobe after effects.
4- then with lottiefiles extension you will be able to convert and save the file as json.
pretty simple right? this method only works if your svg is not animated.
to convert an animated svg, so far and obviously as far as I know you'll need redraw your animation in illustrator and animate it in after effects.
this link will probably be of use.
https://www.youtube.com/watch?v=yPha_s7W-0M

bodymovin: converting .JSON to .SVG?

My question:
Is there a way to convert .json to .SVG
My situation:
I have created animation adobe after effects, i then output a file using Bodymovin extension in after effects
I get the a .json file, and a html file that will show the animation but these don't seem to be places i can get a .svg, unless i can find a way to convert the .json which is why im here. The .svg file / json file both contain animation data. I want to use these animations on the web specifically the .svg file
What i have tried:
searching google results for an hour looking for solutions, none seem to exist thus far
The Lottie for Android library plays Bodymovin files.

How do I determine if a file is a GIF or webp?

I have a file that's .gif extension but I suspect that it's a lie and it's actually a webp. What's the best way to know what format the file is?
By looking into file content and checking its magic number. For webp it's WEBP and for GIF file it is GIF87a/GIF89a.
Here you have list of all magic numbers and where it is located in file: https://en.wikipedia.org/wiki/List_of_file_signatures
You can use TrID, an application that uses file contents to determine file type.

Read TIFF image using LibHaru

I need load an image in TIFF format and export it to a PDF file using the C++ library of LibHaru. Is there a way to load TIFF images using LibHaru? If not, what other option do I have?

My Photoshop image won't show on my site

I've made an image in Photoshop, but it won't show on my site. Instead, it shows up with the little white box with the ripped paper icon. Do I need to convert the PSD file to some other sort of file?
Here is my HTML snippet:
<!doctype html>
<link rel="stylesheet" href="styles.css">
<img src='file:///C:/Users/Tom/Pictures/logo.psd'>
<div align="center">
<h1>Home</h1>
Home
My Products
About
</div>
A PSD file is a file format used by and specific for Adobe Photoshop. Other applications (like your webbrowser) do not know how to read it. You need to convert it to another format.
In Photoshop, with the document open, click File ยป Save As..., and then select as file format the desired format (see image below). Which format to choose, is pretty much explained in another Stack Overflow answer.
It is also recommended that you avoid using file:///C:/Users/Tom/Pictures/logo.psd for links; use relative links instead. If you are ever about to put your website online, with many users, the image won't show up, because the browser of the visitors of your website will look for a file located in C:/Users/Tom/Pictures/logo.psd on their own computes.
You should use jpeg, png or gif, depending on what's more appropriate for your image. Take a look at this other answer for guidance:
https://stackoverflow.com/a/392646/1203176
You can't use a PSD in your website. Convert it to PNG, JPG, GIF or some other format.
You can do this by clicking file > Save for Web.
In the right corner you can select the new image type.
PSD is not a valid web image format. You might export your image in one of the following formats:
JPEG / JPG
PNG
GIF
You must convert it to png for exemple. to do that just open your logo.psd in photoshop and then click file==> save as and choose the png extension.
Web browsers do not render .psd files. This file extension is only properly understood by Adobe Photoshop.
Open your .psd in Adobe Photoshop
Select File -> Save for Web and Devices...
Save your file as .jpg or .png
Use this new saved file as a substitute image where you have the .psd in your .html file