Convert dwg file with external refernced .tif file to Svg - autocad

I have few .dwg file which have linked external .tif file. And I want to convert that to .svg file so that we can display the image on browser.

I hope I understood your question right. Please be precise.
What you could do is copy the References to a certain layer in Autocad, so it is in the dwg itself and then use one of the "DWG to SVG Converter" which you can find on google.
This online converter for example: DWG to SVG Converter!
Hope I could help you.

Related

Cannot open PNGs created with canvas.toDataUrl

I create a png blob from a canvas with the toDataUrl method.
const pngdata = canvas.toDataURL("image/png");
I open a text editor and copy the content of pngdata into a file that I call img.png
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkMAAAiICAYAAAD...
I save this file. When I try to open it (Windows 10) I get "It looks like we don't support this file format"
Removing data:image/png;base64, from the file doesnt help
Why does this not work?
Because your file is still encoded as Base64. You need to decode it to actual binary data for it to be a correct binary file.
You can find many online tools that will do this for you, or the best is probably to directly export your canvas drawing to a binary Blob and download this Blob thanks to a blob:// URL.

Pictures and picture names to doc?

I have a Windows folder full of pictures. I want to copy them all into a MS Office document, but with the picture filename written above each picture. Is there an easyish way to do this?
Thanks!
The .docx format is simply a main XML wrapped up in a ZIP format with any ancillary required files such as images. It would be pretty simple to do what you need.
I would start by producing an example document, renaming it to .zip, and examining the files within.

How to convert image file to svg format with path attributes?

I want to convert image files into .svg format.
I used bunch of tools out there but they gave us with this format
<svg ... >
<image
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAT
....
But I want to have svg file with path attributes.
Any recommendation would be great help.
Not really a programming question, but a quick answer is inkscape, the has a function called 'Trace Bitmap' to turn a raster image such as the png you mention into paths.

Inkscape - Not fully converting png into svg

I opened one PNG file in Inkscape and exported it as SVG. When I opened that file with notepad I came to know that the PNG file is embedded within it. If the conversion happened then the resulting file should have only SVG related tags. It shouldn't embed the image within it. Or Am I doing anything wrong.
Note: Save as option also producing the same kind of file. I am using Inkscape version 0.48 in Windows 7 - 64 bit.
This is a bit of an old thread, but it comes up early in Google so I thought I'd contribute something.
In Inkscape, you must do a trace to change the image into SVG. Look at the Path | Trace bitmap menu item and play with the options on that screen.
After creating the trace, you can remove your source image and have a pure svg in your saved file.
I've found it helpful to create layers in Inkscape and move the source image to one layer and put the trace on another layer to let me make quick comparisons using the 'hide layer' buttons.
BTW, your source image can be anything - bmp, jpg, png, etc.
A .png file is a raster image file. In order to convert it to a vector graphic based format like .svg and have it be "native" svg rather than an included image you are going to either have to use a program that can rasterize it or in Inkscape trace the bitmap and turn it into paths. Inkscape provides information on tracing: http://inkscape.org/doc/tracing/tutorial-tracing.html

Add text to .jpg/png/gif

I heard there is some way, to add additional hidden text inside code of the image file (like jpg/png/gif).
If we open this image in windows, will be shown a picture, but if we open it by some text-editor (like notepad++), we will see our hidden text.
How is this method called? What can you say about it?
Thanks.
Look up steganography. There are lots of tools to add any kind of hidden data you want in there. Usually though, it's not readable by notepad though. you need a companion tool to the one you used to add the data in in the first place. Using this you can even hide a binary file inside.
OR... you could look into using the metadata -- EXIF -- of the JPEG. Lots of tools exist to edit that data too. It ends up stored in the header of the file, so it should be right near the beginning, in other words the file would look something like:
JFIF ..... (GARBAGE) ..... Your Metadata ...... (GARBAGE)
Or finally, I hear that you can just concatenate a RAR onto the end of a JPEG and it will work as a (strangely huge) JPEG but WinRAR will notice the RAR contents when you open it in WinRAR.
This is called steganography.
I think its primary industrial use is watermarking content.
Information Hiding: Steganography & Digital Watermarking is a good resource on the topic.
Use "copy" - copy two files in one.
copy /B img.jpg + some.txt
Thus both file will be merged into the img.jpg file. The text from some.txt is append to the end of the img.jpg file.

Resources