Giter Site home page Giter Site logo

Comments (17)

JPH71 avatar JPH71 commented on May 27, 2024

@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

from pgma-modernized.

j-ktz avatar j-ktz commented on May 27, 2024

from pgma-modernized.

JPH71 avatar JPH71 commented on May 27, 2024

from pgma-modernized.

CodyBerenson avatar CodyBerenson commented on May 27, 2024

@JPH71 why are you not watching ESC? Bad boy.

from pgma-modernized.

JPH71 avatar JPH71 commented on May 27, 2024

from pgma-modernized.

CodyBerenson avatar CodyBerenson commented on May 27, 2024

Sacrilegious. Two Hail Johnny Logans and three Our ABBAs.

from pgma-modernized.

JPH71 avatar JPH71 commented on May 27, 2024

from pgma-modernized.

CodyBerenson avatar CodyBerenson commented on May 27, 2024

@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.

from pgma-modernized.

JPH71 avatar JPH71 commented on May 27, 2024

from pgma-modernized.

udmada avatar udmada commented on May 27, 2024

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.

from pgma-modernized.

CodyBerenson avatar CodyBerenson commented on May 27, 2024

@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!

from pgma-modernized.

udmada avatar udmada commented on May 27, 2024

Hi @CodyBerenson Hope you are having a wonderful time in Spain! Greetings from New Zealand Aotearoa!
Sorry I didn't know you are putting your own money into this project. I appreciate it a lot and at the same time, I don't think it is fair for you to do this for all of us.

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
that is completely free. Plus by utilising Cloudflare's global CDN, we can facilitate the whole image fetch-then-crop process.

from pgma-modernized.

CodyBerenson avatar CodyBerenson commented on May 27, 2024

@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?

from pgma-modernized.

udmada avatar udmada commented on May 27, 2024

from pgma-modernized.

udmada avatar udmada commented on May 27, 2024

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

from pgma-modernized.

JPH71 avatar JPH71 commented on May 27, 2024

from pgma-modernized.

JPH71 avatar JPH71 commented on May 27, 2024

Darned it - it does not work within plex....

from pgma-modernized.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.