Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to replace image form url in placeholder using After Effect CS6

New Here ,
Aug 02, 2016 Aug 02, 2016

I am using

var file = new File(<imagepath>); it is working fine for local image path

but i want to image url ie http://localhost:8080/abcd.jpg

TOPICS
Scripting
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 03, 2016 Aug 03, 2016

maybe this thread will help:

Replace rectangle with an image.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2016 Aug 03, 2016

This is not supported. You need to first download the file and store it somewhere on your hard-drive.

With the function

system.callSystem("PUT ANY TERMINAL COMMAND HERE")

you can execute arbitrary terminal commands. You can use this to download some files (how exactly depends on the operating system you are using, on Mac you can use curl, for example).

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 17, 2016 Aug 17, 2016
LATEST

To add to the above point about using curl, I just ended up having to do this in a project, and after struggling with the ExtendScript socket logic (it may have had to do with the server I was trying to pull images from, or simply my own incompetence), I ended up following the solution, courtesy of FabianTheBlind, who I believe posts on this forum. Note that you have to change your General Preferences to allow scripts to write files across networks.

http://stackoverflow.com/questions/26285164/get-read-text-file-from-url-javascript-for-after-effects

var curlcmd = "curl feeds.nfl.com/feeds-rs/schedules.json > ~/Desktop/test/schedules.json";var stdout = system.callSystem(curlcmd);$.writeln(stdout);var file = File("~/Desktop/test/schedules.json");file.open();var content = file.read();file.close();$.writeln(content);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines