Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6806949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:46:21+00:00 2026-05-26T19:46:21+00:00

My service has both a web version and an iPhone version. On the iPhone,

  • 0

My service has both a web version and an iPhone version. On the iPhone, we ensure that users submit a square version by having it crop when it uploads. We are allowing uploads on the website as well, but we do not have such a feature.

As such, I would like to scale any uploaded image into fitting a 612 * 612 area. What would be the best way to accomplish this?

I am using Ruby / mini_magick

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:46:22+00:00Added an answer on May 26, 2026 at 7:46 pm

    You’d just use the resize method from MiniMagick, there’s an example on the Github page:

    https://github.com/minimagick/minimagick

    Presumably you have the image as a bunch of bytes in memory so something like this:

    image = MiniMagick::Image.read(your_image_bytes)
    image.resize('612x612')
    scaled_image_bytes = image.to_blob
    # Or image.write(filename)
    

    MiniMagick uses standard ImageMagick geometry strings for sizing and, from the fine manual, a WxH geometry:

    Maximum values of height and width given, aspect ratio preserved.

    so using '612x612' will scale the image to fit within a 612px square while preserving the aspect ratio.

    You could also use Jcrop to allow your web users to crop the their uploaded images to fit into a square.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web service which has a generic function that returns a dataset
I'm writing an ASP.NET web service using C# that has a DoLookup() function. For
Hi I have one web service connected to one db that has a table
We are looking at reworking a java business management web service that has been
I created a simple WCF web service that has one method: SubmitTicket(flightticket ft, string
I have a WCF service and a web application that both need to be
I have a web service that performs a database search. It accepts both GET
I understand that AppFabric has both caching capabilities along with hosting WCF/WF services. I
I've got a web service: http://machine001/Services/conversionService.asmx This web service has one method in it
Say I have an ASMX web service, MyService. The service has a method, MyMethod.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.