PHP and Javascript image editing? - image

I'm looking for a site with a robust API or something I can house on my own server to do some image editing. Yes, I know about Pixlr and Photoshop.com, to name 2, but the API features I'm looking for go beyond that.
I am looking to take an image and add another image to it, with transparency. I also want to be able to add text to the image. The additional image need
Any suggestions will help.
Thanks.

http://www.pixastic.com/lib/
Try this javascript library it works very nice :)

Related

Get image from URL - Power Apps

I'm building a simple app, which shows news from different websites, e.g. https://techcrunch.com/2020/07/28/transferwise-five-unicorns/
My source is a database with news URLs.
Each article comes with an associated image. I do not have a URL of the image, only URL of news itself.
My question is, how can I get the associated image to appear in my Gallery? Is there a function I could use?
Here is an effect I'm trying to achieve:
Help please,
Thanks!
Maciej
Ps. I know it is possible, as all rss readers (like Feedly) or even SharePoint news webpart easily pull image just from provided link.. but how?
Are you unable to copy the image path and manually input it into where you want it to go?

Automatically fetch preview image from given URL in Rails

I need help again from the community.
I'm interested to know how to extract a preview image from a given URL in rails.
Basically, it would be a functionality like you have on reddit. When user submits a link (fills in the link field in the _form), a preview image/thumbnail is automatically pulled from a given url. (I would like to save the link of the image as a field in the model, I don't want to save the image itself).
Is there a gem for that or? What's the best way to do it?
Thanks for the help.
There is a gem
github.com/gottfrois/link_thumbnailer
that does exactly what I wanted.
I tested it, and it works as described, so I can recommend it.
You can use some wrappers around PhantomJS:
PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
It's also known for its ability to make web page screenshots.
I found a couple of gems for you: screencap and webshot.
Example with screencap:
require 'screencap'
f = Screencap::Fetcher.new('http://google.com')
screenshot = f.fetch
You're also encouraged to check the documentation, it's pretty straightforward.

How can a browser extension alter the image

I have an April fools prank in mind and I will probably need some time to figure it out, so that's why I'm early:
I want to install an extension in the browser (needs to target botch FF and IE, so a cross browser implementation would be best) of my friend so that if he hits the news page he is visiting every morning, a fake image will make him think that he has been selected. The problem is, that I cannot just swap the images. I have to use the actual image from that website and put his head on the body of someone else.
I do have some graphics guys that can do that sort of stuff. My problem over here is to hook into the rendering process and do my own alterations to the image before it gets rendered. That is, taking the image, doing stuff to it and then passing in the modified image to the browser so that it is being redered instead of the original one.
Is that possible using extensions? If it may be only possible with eihter FF or IE, I might get him to use the browser of choice but I'd highly appreciate your suggestions, code snippets and starting points for research. Are there browser extensions that can do similar stuff?
Cheers everyone. There is a lot of reputation in that game so I don't care if it takes weeks or even months to complete the job.
Thank you guys, looking forward to suggestions!
Max
I think your intentions are harmless, but I must warn you: not all people may find your prank funny. But if you are sure that your friend will enjoy such a prank, it's really easy to set up.
You can use BFilter with site-specific filter to replace the image URL (it is very easy, just look at its examples and documentation). So when the user tries to open the web-page he will see your image instead of original picture. BFilter can be used as transparent proxy. I do not know how to setup transparent proxy in Windows, so you have to figure this part yourself. Alternatively, you can configure all installed browsers to use your filtering proxy.
You can use any other filtering proxy instead of BFilter.

Web Page Rendering Capture

I start with describing the problem itself. Rather than a problem I'm looking for a better solution. I have a asp.net page which has a bunch of images and a link underneath it, Each image is infact the latest rendering of the link underneath it.
I scheduled a bat script which runs every hour to fetch the images through IECapt a web page rendering capture utility. One thing am annoyed about this utility is it takes a lot of time for the 20 images I have and for few because of the flash content it misses to take the actual screenshot of the website.
Now I like to know can this rendering be done by traditional programming am not interested in using any utilities. I'm interested in trying this. The solution need not be necessarily a C# based am ready to try in any other language. Because it gives me a chance to learn.
Thank you.
You should probably look at moz-headless-screenshot
You should be able to embed the functionality you need.
http://blog.mozilla.com/ted/2010/07/29/moz-headless-screenshot/
he also provided a sample embedding client application called moz-headless-screenshot.
This is a simple command line tool that takes a URL, image size, and output filename
and generates a PNG screenshot of the webpage.
You should look into browser shots:
http://browsershots.org/
They do what you want to do for lots of different browsers. It is even open source.
There's no simple-simple solution for what you're asking to do. This is because rendering HTML, CSS, and Flash is actually a very sophisticated process.
If you're up for quite a bit of coding, you can use the Gecko engine (which powers firefox) or another open-source web-browser core (ie Dillo) to render the page onto a custom canvas. Then save that canvas to a file. Unless you implement support for browser plug-ins, you won't get Flash this way, though. You could try using Gnash or its like. Good luck with that.
I don't know of an open-source project that already does this. It would be neat, though :-). If you write something, please push it to the world; it would be really cool to have a "get a screencap of this URL" tool.
One way is to use IRobotSoft web scraper. You can design a robot to go to the URL every hour, and capture the whole web page as an image via a function CapturePage(imagefile).
I am not sure if it will be better than IECapt though.
We have used ACA WebThumb ActiveX Control (http://www.acasystems.com/en/web-thumb-activex/) quite successfully to capture parts or whole of a web page in the web server and then to write them to a file, just passing in the url. It performs fast enough for our need.
I am not familiar with IECapt, but this might be something you might want to have a look at.

Ajax Image gallery / Open, Close Window Effect

Can anyone point me in the direction of such a script? It should also be able to work when called into another ajax window. This is the type of gallery i am going for:
http://dageniusmarketer.com/DigitalWonderland/pages/DemoGalleryExample.html
It should go on this page:
dageniusmarketer.com/DigitalWonderland/
Portfolio section.
This script should be real simple to use with minimal extra files to make it work. I also should be able to just drop images in a gallery folder and it populates the gallery automatically with thumbnails....I shouldnt have to write code for each image in my html. Should be all dynamic.
I also would like to know how I could go about a window effect where every time I open up a new section via my navigation, the window shrinks closed with the old content, then expands open with the new content. the window effect should be vertical (top to bottom shrink into center, expand from center top to bottom)
Please Let me know. Thanks
JQuery is one of my personal favorite javascript libraries (along with 99% of this site apparently!)
But it will have a learning curve, as your requirements seem pretty specific, and you will have to read some documentation to pull it off.
Try Spry from Adobe. They have a very similar demo. Also, the other common frameworks for this would be prototype/scriptaculous, dojo, mootools, jquery. In many cases they have extensions that would provide the exact thing you are looking for. For example, try
shadowbox extension which is framework agnostic. Best of luck!
Imago looks promising:
http://imago.codeboje.de/
Just discovered the very awesome-looking jQuery Tools library today. Meets your "simple and minimal" requirements and could probably pull off what you've sketched, with just the "tooltips" and "scrollable" components.
I also should be able to just drop images in a gallery folder and it populates the gallery automatically with thumbnails
My instinct is that you'd be better off writing server-side code to handle this part of your requirement.

Resources