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

  • SEARCH
  • Home
  • 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 7805407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:13:01+00:00 2026-06-02T02:13:01+00:00

I am using play framework 1.2.4. I am having a problem with Image.resize() method

  • 0

I am using play framework 1.2.4. I am having a problem with Image.resize() method that is removing transparency in png images?

My code looks like this:

public static void uploadPhoto(int user_id, File picture) throws IOException{

        Images.resize(picture, picture, 200, 200, true);

        FileInputStream f = new FileInputStream(picture);
        user.getPerson().setPicture(IOUtils.toByteArray(f));
        user.getPerson().save();
        ...
    }

I would like to know how to do resize without losing PNG transparency?

Thanks.

  • 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-06-02T02:13:03+00:00Added an answer on June 2, 2026 at 2:13 am

    Looking at the source code for play.libs.Images https://github.com/playframework/play/blob/master/framework/src/play/libs/Images.java, when the new sized image is set up (line 102), the image is defaulted to a White background. This looks like why your transparency is being lost.

    I guess this is a bug.

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

Sidebar

Related Questions

Using play framework 1.2.4 with scala. I have few play jobs that looks like
Im using the AVFoundation framework to play sound files. The problem im having is
I'm trying to test a model method using Play Framework 2.0 and Specs2. Global.scala
I have a Play Framework application that sends emails using SMTP server. Now I
Im having a problem getting zend framework to play nicely with subdomains on my
I am building a project using the Play framework and I am having trouble
I'm using play framework 1.2.4 and i'm preparing an meal order system. So i
play framework: 1.2.3 Hi, I am trying to purge my database by using play's
i'me working on a web server using play framework 2.0, where the login is
I'm developing a web app, using Play framework and javascript, but exactly I don't

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.