screeenly icon indicating copy to clipboard operation
screeenly copied to clipboard

Change output requirements

Open TornMarketing opened this issue 4 years ago • 8 comments

Currently we have our API linked up to integromat.com, they measure service costs based on operations and data (MB)

Been testing out Screeenly and we only need the temp URL, would it be possible to select which outputs are required, ie URL, base64, base64_raw.

Thus change the size of the received data

Secondly, the ability to resize, adjust compress of the PNG as its outputted would be amazing :)

TornMarketing avatar Jul 19 '20 11:07 TornMarketing

In addition, ability to Crop the output image

  • top x pxels / x%
  • bottom x pxels / x%
  • left x pxels / x%
  • right x pxels / x%

TornMarketing avatar Jul 19 '20 11:07 TornMarketing

@TornMarketing Thanks for the feedback. I'm currently working on the last, finishing touches of v3 of screeenly. That new version no longer returns base64 or base64_raw; just the URL to the image. That solves the output size ;)

In addition, you will be able to crop an image in exactly the way you mentioned (top, bottom, left, right).

However, for the start, v3 won't be open source. It will be a hosted SaaS which requires users to subscribe to one of our many plans. (I might also add a credit system, so you don't have recurring costs and only pay for what you use)

The plan is to maybe port some features back to the current open source version, or make v3 open source in the distant future. The goal with v3 for me is, to generate a small bit of revenue, to offset the server costs for the last 6 years 😅

I will mark your issue as a feature here.

stefanzweifel avatar Jul 19 '20 12:07 stefanzweifel

If you're self hosting screeenly and you want to remove the base64-output, you can remove the following 2 lines from the code to make this work.

https://github.com/stefanzweifel/screeenly/blob/master/modules/Screeenly/Http/Controllers/Api/v1/ScreenshotController.php#L47-L48

stefanzweifel avatar Jul 19 '20 12:07 stefanzweifel

@TornMarketing Thanks for the feedback. I'm currently working on the last, finishing touches of v3 of screeenly. That new version no longer returns base64 or base64_raw; just the URL to the image. That solves the output size ;)

In addition, you will be able to crop an image in exactly the way you mentioned (top, bottom, left, right).

However, for the start, v3 won't be open source. It will be a hosted SaaS which requires users to subscribe to one of our many plans. (I might also add a credit system, so you don't have recurring costs and only pay for what you use)

The plan is to maybe port some features back to the current open source version, or make v3 open source in the distant future. The goal with v3 for me is, to generate a small bit of revenue, to offset the server costs for the last 6 years 😅

I will mark your issue as a feature here.

Hey mate,

Managed service with a credit per unit sounds good (assuming its economical), Be keen tho to see the 500 errors be resolved which I have experienced a few today from the testing environment. Unsure if that server or software related tho

TornMarketing avatar Jul 19 '20 13:07 TornMarketing

title An error accoured message An internal error accoured. errorCollection status 500 detail The process "PATH=$PATH:/usr/local/bin NODE_PATH=npm root -g node '/home/forge/screeenly.com/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"https://domain.com","action":"screenshot","options":{"type":"png","path":"/home/forge/screeenly.com/storage/app/public/5f14466c8b6a6_LmjFpckTRooHieUIPuANnVoudjU3mB.png","args":[],"viewport":{"width":1920,"height":1080},"ignoreHttpsErrors":true,"timeout":30000,"delay":10000,"userAgent":"screeenly-bot 2.0"}}'" exceeded the timeout of 30 seconds.

TornMarketing avatar Jul 19 '20 13:07 TornMarketing

The pricing structure is economical :)

It seem‘s the error isn‘t properly handled by the app itself. The chrome browser timed out before creating a screenshot. One of the many things I would like to fix.

stefanzweifel avatar Jul 19 '20 14:07 stefanzweifel

ahh so its an outstanding issue, so going to be a little longer than a day to fix haha.

ok, I might tap out and find something that can help me out today

TornMarketing avatar Jul 19 '20 15:07 TornMarketing

@TornMarketing This is often not a reproducable issue. Most of the time a subsequent request to the API will result in a correct screenshot being generated. Like with the browsers we use to browse the web, sometimes things break and a simple page refresh works wonders. 😅

But the goal is to make the API response more useful, so that you as a consumer of the API now what do to next.

stefanzweifel avatar Jul 21 '20 07:07 stefanzweifel