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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:56:13+00:00 2026-05-26T09:56:13+00:00

If we take, say, 32-bits per pixel pictures using ARGB and ARGB_PRE (ARGB but

  • 0

If we take, say, 32-bits per pixel pictures using ARGB and ARGB_PRE (ARGB but with premultiplied alpha), are the values identical when the alpha is fully on (that is: no transparency at all)?

For example if I have an ARGB pixel with the following value: 0xFF808080 (which is a shade gray, without any transparency because the alpha is at its max value: 255), what would this become in ARGB_PRE?

How can I find this out by myself? Is it enough to instanciate one buffered image using ARGB and the other ARGB_PRE and using setRGB(…) on both and then comparing the int I’d get back?

For example if I do this:

    final BufferedImage bi1 = new BufferedImage(10,10,BufferedImage.TYPE_INT_ARGB);
    final BufferedImage bi2 = new BufferedImage(10,10,BufferedImage.TYPE_INT_ARGB_PRE);
    bi1.setRGB(0,0,0xFF808080);
    bi2.setRGB(0,0,0xFF808080);
    System.out.println("bi1: " + Integer.toHexString(bi1.getRGB(0, 0)));
    System.out.println("bi2: " + Integer.toHexString(bi2.getRGB(0, 0)));

I get back the same value for both, but it’s normal it’s the very value I gave.

Basically my question boils down to this: if pictures doesn’t have a single pixel being
transparent, can I generate the exact same pictures by using the exact same values both in ARGB and ARGB_PRE modes?

Or formulated this way: if I don’t have any transparent pixel, are ARGB and ARGB_PRE basically identical?

  • 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-26T09:56:14+00:00Added an answer on May 26, 2026 at 9:56 am

    Premultiplied alpha means that colors stored in the image data are multiplied by alpha, so they dont need to be multiplied when composing(drawing).
    this doesnt change how image looks when drawed, but how it’s data is stored…

    BTW if your image only has alpha values of 255 (255 in composing means 1.0f) then resulted color will always be 1 * color = color (not changed)

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

Sidebar

Related Questions

I'm looking for a way that I can take say, a 200x200 pixel image
Say I want to take the first item of the lists '(4 3 1)
Take a very simple case as an example, say I have this URL: http://www.example.com/65167.html
Say you have several webparts, one as a controller and several which take information
The program is supposed to take a file, say data.dat, filled with a list
I want to be able to take a dynamically created string, say Pigeon and
Is there a way to take any number, from say, 1 to 40000 and
If something is making a single-thread program take, say, 10 times as long as
I'm wondering if there are algorithms that can take, say, a 100x70 image and
I have a basic PHP question, take the code below for example, let's say

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.