-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace VB Script Image Cropper with a Python Alternative #20
Comments
@j-ktz Cheers Jason |
Happy to help! Just let me know :)
…Sent from my iPhone
On May 16, 2020, at 10:39 AM, JPH71 ***@***.***> wrote:
@j-ktz
I may need your help to test the cropper on MAC OS since you use a Macintosh.
For MACS I may opt to write an applescript program to do the cropping, let me investigate this first...
Cheers
Jason
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
brilliant!
…On Sat, 16 May 2020 at 15:47, j-ktz ***@***.***> wrote:
Happy to help! Just let me know :)
Sent from my iPhone
> On May 16, 2020, at 10:39 AM, JPH71 ***@***.***> wrote:
>
>
> @j-ktz
> I may need your help to test the cropper on MAC OS since you use a
Macintosh.
> For MACS I may opt to write an applescript program to do the cropping,
let me investigate this first...
>
> Cheers
>
> Jason
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKKTDTKUBPNQ3VU6S33RR2RQTANCNFSM4MYGAWLA>
.
|
@JPH71 why are you not watching ESC? Bad boy. |
It's just a repeat of the old stuff...
…On Sat, 16 May 2020, 20:19 CodyBerenson, ***@***.***> wrote:
@JPH71 <https://github.com/JPH71> why are you not watching ESC? Bad boy.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKOVTUGFPBUNDFFUBCTRR3RK3ANCNFSM4MYGAWLA>
.
|
Sacrilegious. Two Hail Johnny Logans and three Our ABBAs. |
Lol... Good one
I managed to write another scrapper though for gay-movie.org...
Just got to test it first.
…On Sun, 17 May 2020, 00:18 CodyBerenson, ***@***.***> wrote:
Sacrilegious. Two Hail Johnny Logans and three Our ABBAs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKP4LRWFYKCSM2HECPTRR4NOFANCNFSM4MYGAWLA>
.
|
@JPH71 |
I will do my best!
…On Mon, 22 Feb 2021 at 16:03, Cody Berenson ***@***.***> wrote:
@JPH71 <https://github.com/JPH71>
Update: The google cloud platform the Thumbor instance is currently hosted
on expires in 70 days. From a prioritization of workload perspective,
please enable an alternative to Thumbor by then.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKN2XPN2TWV3AVRRZQDTAJ547ANCNFSM4MYGAWLA>
.
|
double posting as I've commented on @codeanator's fork: Thanks for all your effort first of all! Not sure how you or the original author implemented this Thumbor service, but from what I saw, it seems to me that this Thumbor is living on a Python/Tornado server. Processing image is a particular use case for taking a more serverless approach, given that most of the time, image processing is handled on the fly. Practically, there is no need to actually host a server (aka low utilisation rates). What I would suggest is that maybe we can look into a solution such as this: https://github.com/aws-solutions/serverless-image-handler AWS or GCP or Azure doesn't necessarily matter I guess. It will bring down the overall operational cost and provide a more scalable and reliable solution. |
@dulinnan Hi there, thanks for the suggestion. I’ll look more into when I return home from holiday in Spain. One note though: there is no current operational cost because we use GCP’s free-trial service and just initiate a new one when it expires.It isn’t elegant because we quarterly have to update the thumbor address. I'm ok personally paying GCP a nominal amount to keep a stable image processing service that is available to all, but as you note Thumbor would cost me about $30/month which wont do (hence our current free-trial solution). So, Im looking forward to digging into your suggestion. ¡Gracias! |
Hi @CodyBerenson Hope you are having a wonderful time in Spain! Greetings from New Zealand Aotearoa! Being cost-conscious myself, I have leaned towards a more serverless approach for my personal projects. Matter of fact, I just built a simple serverless worker that resizes a given image based on this repo : https://image-worker.udmada.workers.dev/poster.png?mode=limit&width=200&height=300&origin=https://pic.aebn.net/dis/i/Stream/Movie/BoxCovers/a272364_xlf.jpg |
@dulinnan |
Hi! Thanks for the reply!
And rest up!
As for the cloud provider, yes normally you do need an account and some
fees do occur but the way how I implemented the worker in my previous
comment requires only an account but zero fees as the free quotes is good
enough for this small community.
…On Thu, 3 Feb 2022 at 09:25, Cody Berenson ***@***.***> wrote:
@dulinnan <https://github.com/dulinnan>
Hi, Finally back from Spain and jetlagged as hell! I'm not very cloud
savvy....but I don't see how the serverless approach can be implemented
without a cloud provider account and therefore a monthly fee. Therefore,
serverless or thumbor, we're still limited to the 90 day free trial
accounts. Am I missing something?
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABS4NGUIC6X3NUGCH4IZ6PDUZGHMRANCNFSM4MYGAWLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Would this work somewhat? if os.name == 'posix':
file_extension = picInfo.format
log('UTILS :: Using Python Pillow to crop image to: {0} x {1}'.format(desiredWidth, desiredHeight))
remote_pic = Image.open(BytesIO(picContent))
cropped_pic = remote_pic.crop(((width - cropWidth) // 2,
(height - cropHeight) // 2,
(width + cropWidth) // 2,
(height + cropHeight) // 2))
img_byte_arr = BytesIO()
cropped_pic.save(img_byte_arr, format=file_extension)
picContent = img_byte_arr.getvalue() Not a python person XD |
oooh i am going to try this tonight....
I can then get rid of the vbscript!
thank you....
…On Thu, 10 Nov 2022 at 12:27, Adam ***@***.***> wrote:
Would this work somewhat?
if os.name == 'posix':
file_extension = picInfo.format
log('UTILS :: Using Python Pillow to crop image to: {0} x {1}'.format(desiredWidth, desiredHeight))
remote_pic = Image.open(BytesIO(picContent))
cropped_pic = remote_pic.crop(((width - cropWidth) // 2,
(height - cropHeight) // 2,
(width + cropWidth) // 2,
(height + cropHeight) // 2))
img_byte_arr = BytesIO()
cropped_pic.save(img_byte_arr, format=file_extension)
picContent = img_byte_arr.getvalue()
Not a python person XD
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKOORKUXWSCHNLXQQTDWHTL35ANCNFSM4MYGAWLA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Darned it - it does not work within plex.... |
@JPH71
When the thumbor instance is unavailable, the Scene Agents will fire off a VB script which crops poster images. It is a terrific solution and works perfectly....as long as you are on a windows platform.
Please consider replacing the VB script functionality with a Python Alternative, if feasible, so that the solution is platform agnostic.
Hopefully @acvigue is able to identify the issue with the thumbor instance for those folks not on a Windows platform.
The text was updated successfully, but these errors were encountered: