I have a list of hundreds of hyperlinks that are to image files from my supplier. The problem is they have a .nl file extension. Here's an example:
http://www.netsuite.com/core/media/media.nl?id=66821&c=ACCT120207&h=bad4512e36320e5b2239
I need to use some sort of batch process to find all those image files and convert them to a .png or .jpg link (or batch download all the images then rename them)
Do you have any suggestions?
As you don't show an excerpt from your list of URLs, nor state your Operating System, it is rather hard to help you process the entire list.
However, for the one URL you show, you can retrieve the image and store it locally as "image.jpg" like this:
curl -L "https://system.netsuite.com/core/media/media.nl?id=101065&c=ACCT120207&h=ff667401c82a7dc4c2e1" > image.jpg
Related
Currently, I'm trying to move a docx to a mediawiki file and preserve the proper filenames in the [[Image:]] tags. For some reason, the proper image file gets swallowed (ie, normally it'd be media/image4.jpg, but instead it's just empty).
I've tried extracting the docx and looking at docx/word/_rels/document.xml.rels but I have no idea how to figure out what images are duplicated. I made a simple script to do some find/replace, but in one file I have 130 [[Image:]] tags and only 105 images.
As such, I would like to have the MediaWiki filter output the proper image name when doing this:
soffice --headless --convert-to txt:MediaWiki myfile.docx
I'm on ubuntu 14.10.
Is this possible?
This doesn't appear to be possible, but I have written a workaround found here that solves it. The long and short of it is that I convert the file and manage uploading / linking of images manually.
Is there any way to bulk download background images from an image sequence?
Specifically, I'm looking to download the different image sequences from this website: lookbook.reebok.com
I found a solution to it. In terminal, write curl http://asdf.com/what/ever/image/img[00-99].gif -o img#1.gif And change it to your desired URL, number of images and format. If you write a number thats higher than what exists, terminal will create empty files in the format you requested.
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.
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.
i need to convert rtf document that contains images (jpgs/pngs ) to image format
jpgs or pngs programmaticly , do you have any ideas on how to do it ?
on server side (web)
Thanks
You can use a virtual printing device, for example: http://www.joyprinter.com/
If by programmatically, you mean scripts, you could script your RTF program to open files, then export to PDF, then export the PDF to an image. At least, this kind of operation is relatively easy on OS X. You could probably do it entirely in Automator, using TextEdit and Preview. Otherwise, on OS X you could also try accessing the core services that would do the same thing. No clue on Windows though. Hope that helps!
You might want to write a bash script to be executed by a cronjob. So at a defined time, or after a defined period, you will have your rtf files converted into jpgs.
Though I don't know if this might satisfy your "programmatic" need .. here is how to do this conversion:
To convert rtf files contain "advanced" features like images, as in your case, you need unoconv, which requires libreoffice to be installed.
unoconv -f pdf "${input_file}"
Otherwise, just for reference because it's not your case, if the rtf files contain only simply text you can avoid the requirement to have libreoffice installed by using a cascade conversion like
// convert rtf to txt
unrtf --text "input_file.rtf" > "temp.txt"
// convert txt to pdf
enscript "temp.txt" -o - | ps2pdf - "temp.pdf"
// convert pdf to jpg
convert -quality 100 -append "temp.pdf" "output.jpg"
// remove temp files
trash "temp.txt" "temp.pdf" // or rm if you prefer