filepicker.io mass convert image - filepicker.io

Is there a way to mass convert an image? We're experimenting with replacing imagemagick and taking the load off of our servers -- I've got a version working that just loops through the sizes and calls convert on the original image, making 23 copies of differing styles (sizes and crops). However, if the user leaves the page before all the conversions are done, the script stops and I end up missing a bunch of image styles.
Is there a good way to get around this with Filepicker.io? I'd really like to be able to just pass a list of options to the convert method and have it complete in the background.
Thanks in advance,
- Jeff

The best way to do this is either using the /convert endpoint to do on-the-fly conversion (https://developers.filepicker.io/docs/web/#fpurl-images) or to do a POST to our rest endpoint to create the converted images and store them in S3 via a server-side call

Related

compare photos, and choose the most similar

I want to develop an app that does the following:
takes a photo
searches the database for a similar photo
now the question .. how can I do the second step with flutter ??
so that means how can I compare of two photos, where the first photo is in the database and the second is just taken from the camera
Let's split your problem into parts
For image comparison, or as I understand your question, finding if an image exists inside another image, OpenCV is your best friend. The first thing is to get comfortable with OpenCV and your favorite language (Python, C#, Java).
Checking images for similarity with OpenCV
I'm not sure if you edited the question while I was writing this answer, or if I just misunderstood.
If you want to make the comparison inside your app,
understand how to invoke OpenCV from your Flutter application
https://pub.dev/packages/opencv
If the comparison is not made on the phone but is going to be made after the user uploads the photo to a server, then you need to create a REST endpoint to upload the picture, compare it with other photos stored in the server (using the aforementioned OpenCV) and return the response to the user. To transmit the image to the server you could convert it to base64.

Copying images in from anti-scraper websites. Google Docs handles it easily - anyone know how?

I've been playing around with making a draftjs plugin that lets the user paste in mixed text&image content from websites and have images auto-uploaded to the server. I've quickly come to the realization that it's not easy, simply because of how many different sites use different kinds of counter-measures for copy/pasting images. Standard image tags in page content are no problem - easily grab the src and handle the file upload from the url. However, many sites use all kinds of trickery to make this a pain. For example, some will only serve small thumbnails, requiring a GET request on the image with a hash key in order to retrieve a larger version. Others somehow seem to corrupt the image so that it's unreadable by the time it's been retrieved. Others still play with weird embed tags to mess with draftjs' image blocks.
But then I open up a Google Docs file, and find that when I copy any images into that from a website, there's never any troubles whatsoever. All the problematic websites that I'm finding myself having to write specific methods for retrieving from seem to be handled by Google Docs with ease.
Am I using completely the wrong approach by trying to retrieve images from a url? Does Google use a far superior approach (yes, I presume) - in which case, does anyone have any idea what that approach might be?

obscuring / securing filepicker / filestack urls

I use filepicker to serve resized / cropped / watermarked images on a website. I use the regular URL based API to do this: e.g. a url might look like https://.../convert?h=400&w=600&fit=crop&quality=80&format=jpg&cache=true
This obviously allows a lot of flexibility for sizing images on the fly and so on. However, it also means that anyone can get the original un-cropped, un-watermarked image by removing the parameters at the end of the URL.
Is there any way around this short of creating a proxy server that could un-encode an encoded string?
For the latest version, it seems you need to add in your API key to the URL as well - what would stop someone else from using my API key? Are these URLs really meant to be used on a production website in the <img> tags? or for creating a resized image to download, store and ultimately serve up to the end user?
We have updated our processing engine so that it is no longer necessary to pass an API key if you are transforming an image based on its Filestack Handle:
https://process.filestackapi.com/watermark=file:ZoVdwbe6Qcu9uIxIZSuU/h2T4Jl9RBSSXOGtl0gv8
However, a user could still get the image without the watermark. So, we also have a store method built into the processing engine:
Posting the image with our store task attached:
curl -X POST -g "https://process.filestackapi.com/store/watermark=file:ZoVdwbe6Qcu9uIxIZSuU/h2T4Jl9RBSSXOGtl0gv8"
Will return the following:
{"filename":"photo-1435771112039-1e5b2bcad966.jpg","height":750,"size":67588,"type":"image/jpeg","url":"https://cdn.filestackcontent.com/62aWdbPvQzWNrl90C7q9","width":1000}
Which is a saved version of the watermarked image, so the watermark cannot be removed:
https://cdn.filestackcontent.com/62aWdbPvQzWNrl90C7q9
We recommend using the newer method but you should also set up security so that people can't hotlinking to your content.
https://www.filepicker.com/docs/security/
I would also recommend move over to Filestack as it we have rebuilt all the infrastructure.

Filepicker.io - image conversions preventing video uploads

We're currently working with Filepicker.io to allow users the ability to upload both images and videos. It appears that if we specify image conversions in the Javascript API options, video uploads don't process and instead get stuck at 99.30%. If I remove the 'conversions' option, video uploads process without issue. Is it not possible to specify image conversion options and accept both type of uploads? If so, this should really be specified in the docs.
I attached a JSFiddle with the code in question. http://jsfiddle.net/BYkD4/
It might be an issue on our end, taking a look now. For large files (+1Mb) we split the file into chunks, upload them in parallel, and then reassemble them on the server side. We use browser progress up to the 90% mark, after which we have to "best guess" what the server-side progress looks like, for now at least. That's the reason why it's hanging at 99.30% - it may actually be able to complete if you give it enough time.
In any case, looking into it
Edit: looks like this was an issue on our end. Fix deployed, everything should be working fine. Sorry about the issue

Options to create editable graph or scheme with Perl?

I'm searching for a way to create complex/simple graph using Perl.
The known modules/applications I've checked are: GraphViz, Graph-Easy, aiSee etc.
Each way I walked, new problems appeared.
If my need is to create graph dependencies that
can be edited live
have a directed compass mode
work fine and are readable with massive data use
can be used through the terminal to convert from input format (GDL etc.) to output format (PNG, BMP, HTML etc.) –
what are the various applications that can handle all of these requests?
This question is a follow-up of How can I convert connection data lines to block of schemes using Perl?.
Thanks,
YoDar.
It might be an overkill for your application, but you might also want to look into PerlMagik.