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 8368145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:19:07+00:00 2026-06-09T13:19:07+00:00

Whenever a user uploads a photo using my script, WideImage converts it to JPEG.

  • 0

Whenever a user uploads a photo using my script, WideImage converts it to JPEG. However, I just noticed that if I upload a PNG picture, with a transparent background, it makes it black instead.

Is there any way to make this white instead?

This is how i save the image:

$img->resizeDown('500', null)->saveToFile('annonce_billeder/'.$bnavn.'.jpeg', 70);
  • 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-09T13:19:09+00:00Added an answer on June 9, 2026 at 1:19 pm

    Edit

    I looked through the API and I don’t see anything for setting the BG color on resizeDown or changing the alpha channel on the PNG before resizeDown… I do however, think that you can use the merge method to merge the PNG with a white background image. Take a look at the API for that function, essentially the PNG image would be the “watermark”.

    http://wideimage.sourceforge.net/wp-content/current/doc/WideImage/WideImage_Image.html#methodmerge


    Posting some code might help… you might be able to use this method

    $white = $image->allocateColor(255, 255, 255);

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

Sidebar

Related Questions

Whenever a user uploads a photo using my script, WideImage converts it to JPEG.
Whenever a user uploads a new image, and the image name remains the same
I'm using OpenLayers map in my project,I'm displaying list of items on map.Whenever user
I want that whenever the user types http://localhost:8280/services/Facebook/sea the actual request should be http://localhost:8280/services/Facebook/search?q=jack
I am making an application. Now what i want is that whenever user Press
i am using iframe to refresh captcha whenever user makes an error in typing
The situation is that the user enters a value in the textbox.Now whenever user
I'm using javascript window.onbeforeunload function to show an alert to user whenever user tries
I have table with following structure Whenever user click on checkbook and click on
I am building an app which requires saving a form whenever user enter the

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.