How Photoshop converts the RGB 16-bit values to 15-bit and 8-bit?

Can someone please help me understand what rounding of diet or another algorithm is used when Photoshop reduced a 16-bit color 8-bit?

For example, the two colors (was and B) are the colours of 16-bit swatch taken directly from a file of the ACO:

A16 = (61603, 60948, 58982)

B16 = (58326, 57015, 52428)

Photoshop displays the values of "16-bit" (acutally 15 bits) as well:

A15 = (30802, 30474, 29491)

B15 = (29163, 28508, 26214)

It seems that the 15-bit values are the result of the division by two and rounded to the nearest integer.

With 8-bit, it's another story although:

A8 = (240, 237, 229)

B8 = (222, 227, 204)

Now, if we divide the 16-bit value by 256, the following:

A8_float = (240.6, 238,1, 230,4)

B8_float = (227,8, 222,7, 204.8)

It's a similar story during the allocation of the 15 by 128 bit values. No system rounding or truncation will get the same answers as Photoshop for 8 bit I see. What I can't work, it's how Photoshop calculates these figures. It's the division of integers, floating point division with rounding or truncation? I'm puzzled. Help, please.

-> range 32768-65535: (32768 * x + 32767) / 65535

Not quite dividing by 2, otherwise you miss the white point.

32768-> 255 range: (255 * x + 16384) / 32768

With the exception of dithering, it is all simple mathematics.

Tags: Photoshop

Similar Questions

  • How to convert the DVD of Windows 7 USB Flash Drive and even install from a USB Flash drive

    My lappy dosent recognize Windows 7 Home Premium DVD. Can I burn the image to DVD on my USB Flash drive using my desktop and then install Windows 7 on my USB Flash drive lappy. If yes how?

    Yes, you can.

    the file .iso image from Microsoft for the USB/DVD tool allows you to create a bootable DVD or USB (requires a blank DVD or USB flash to at least 4 GB key).

  • How to convert the analog voltage input form data to True and false (0 = fasle 0: 1-10 = true)

    I want to use for LED or photo

    10 V to ai0 reciece ex to see the LED or photo on front panel

    Help me please

    As part of the comparison, it should look like this.

    Freelance LV cited above, you must provide additional information to get an apt solution

  • How to get the RGB value of a pixel in a psd document using scripting Photoshop

    Hi, guys!    Does anyone know how to get the RGB value of a pixel in a psd document using scripts in Photoshop?  I myself have missed for a long time and could not resolve. I am very happy to hear your voice as soon as possible!

    Here is an example...

    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = activeDocument;
    var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1));
    var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5));
    var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14));
    alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3);
    var decColour = eyeDropperRGB(40,doc.height-14);
    alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]);
    app.preferences.rulerUnits = originalUnits;
    function GetHexColour(reqHex){
    var out='';
    for(No in colours = reqHex){
     out = out.concat(zeroPad(d2h(reqHex[No]),2));
     }
    return out;
    };
    function eyeDropperRGB(x,y) {
     var x2 = x + 1;
     var y2 = y + 1;
     var out = new Array(3);
     activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false);
     for(ch in list = ["Red", "Green", "Blue"]) {
     histogram = activeDocument.channels[list[ch]].histogram;
      for (i = 0; i <= 255; i++) {
       if (histogram[i]) {
        out[ch] = i;
        break;
       }
      }
     }
      return out;
    };
    function d2h(d) {return d.toString(16);}
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;
    };
    
  • How to get the RGB color values on the color picker component?

    How to get the RGB color values on the color picker component?

    trace (cp.selectedColor);

    Returns something like:

    16750950

    trace (key2cp.hexValue);

    Returns:

    ff9966

    I'm looking for RGB, for example, 0.5 0.5 0.5, corresponding to a gray color.

    Is there a chance that the RGB settings are hidden somewhere or is there a conversion function at least?

    Thank you.

    If key2cp.hexValue returns a string like 'abcdef', use:

    var s:String = key2cp.hexValue;

    var n: Number = Number("0x"+s);

    var r: Number = n > 16 & 0xff;
    var g:Number = n > 8 & 0xff;
    var b:Number = n & 0xff;

  • How to convert U32 matrix 8-bit grayscale image?

    Good day to all,

    I got a U32 512 * 512 data table of photomultiplier using the analog inputs of the DAQ card. My question is how to convert this matrix 32-bit to 8-bit monochrome image for display.

    I tried the method in this post to convert grayscale image https://decibel.ni.com/content/docs/DOC-4155 table but the result resembles an outline rather than the actual image. I guess that's because their contribution to flatten Pixmap is 8 bits, but mine is 32-bit. I have a gamma correction to the scale of my data? But how?

    I have attached the original image, which is a particle. I have also attached my labview code and the processed image.  Thank you!

    Then, you will likely make you own custom conversion then increasing the difference between the brightest and darkest. You could just do 4294963840 the zero and 4293967276 the max and scale up to 0-255

  • Please how to convert the photo to the second

    2012-Kia-Rio-SX-side1.jpg11707850_10153403835594354_514303523436587694_n-1.jpg

    Please guys how to convert the kia rio pictures the second perfect like this, and with any program, I know that all steps in details please its very important

    That looks just like you would use the tool pen to redraw on the image and create shape layers (black areas). It could be done in Photoshop or Illustrator.

    Using Photoshop | Draw with the pen tools

  • How to convert the precision extended float to float in C++

    Hello

    Could someone me please how to convert the extended precision (floatExt) float normal float in C++?

    What is the difference in the float between Labview and C++ data type?

    When I tried to receive a range of float of a function of the DLL generated by Labview in C++, data are bad.

    Thank you

    Victor King

    You can search for numeric data types in LabVIEW help for more information on the different types of data. Before sending the data to the C++ application, you can use the function of Double precision on digital / range of Conversion to convert number to Double precision.

  • How to convert the date in milliseconds?

    Hi all

    Can I know how to convert the date in milliseconds?

    My current datetime like this Formate

    QDateTime::currentDateTime (m:System.NET.SocketAddress.ToString ("MMMM dd, yyyy HH"))

    Seconds since January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toTime_t

    Sinds milliseconds January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toMSecsSinceEpoch

  • Hello, I have a full desktop in Adobe Muse, site and I want to convert it into a version Tablet &amp; phone, then, how would convert the site Office to Tablet &amp; phone to copy the entire office content and site structure? Thanks for any help.

    Hello, I have a full desktop in Adobe Muse, site and I want to convert it into a version Tablet & phone, then, how would convert the site Office to Tablet & phone to copy the entire office content and site structure? Thanks for any help.

    You can not automatically convert. Click on the "tablet" or "Phone" at the top of your plan view to create these versions.

    You can then copy and paste on any content you want has more of your office.

  • How to convert the following code in as3?

    As the title says... How to convert the following code to as3?... Thanks in advance.

    import flash.display.BitmapData;

    linkageId = "landscape";
    myBitmapData = BitmapData.loadBitmap (linkageId);


    MC = this.createEmptyMovieClip ("mc", 1);
    mc.attachBitmap (myBitmapData, 1);

    onMouseMove = function() {}
    myNewColor = "0 x" + myBitmapData.getPixel(_xmouse,_ymouse).toString (16);
    newColor.setRGB (myNewColor);
    selectedColor.colorValue.text = myNewColor;
    }
    selectedColor.swapDepths (_root.getNextHighestDepth ());
    newColor = new Color (selectedColor.sample);

    :

    var myBitmapData:landscape = new landscape (0,0);

    var bmp:Bitmap = new Bitmap (myBitmapData);
    addChild (bmp);

    stage.addEventListener (MouseEvent.MOUSE_MOVE, f);

    function f(e:MouseEvent):void {}
    var myNewColor:String = "0 x" + myBitmapData.getPixel(mouseX,mouseY).toString (16);
    newColorTransform.color = uint (myNewColor);
    selectedColor.sample.transform.colorTransform = newColorTransform;
    selectedColor.colorValue.text = myNewColor;
    }
    addChild (selectedColor);
    var newColorTransform:ColorTransform = selectedColor.sample.transform.colorTransform;

  • How to convert the hierarchical query of SQL Server (CTE) to Oracle?

    How to convert the hierarchical query of SQL Server (CTE) to Oracle?

    WITH cte (col1, col2) AS
    (
    SELECT col1, col2
    FROM dbo. [tb1]
    WHERE col1 = 12
    UNION ALL
    SELECT c.col1, c.col2
    FROM dbo. [tb1] AS c INNER JOIN cte AS p ON c.col2 = p.col1
    )
    DELETE one
    FROM dbo. [tb1] AS an INNER JOIN b cte
    ON a.col1 = b.col1

    Hello
    Something like this maybe:

    DELETE FROM dbo.tb1 a
     WHERE EXISTS (
      SELECT 1
        FROM dbo.tb1 b
      WHERE a.co11 = b.col1
          AND a.col2 = b.col2
       START WITH b.col1 = 12
      CONNECT BY b.col2 = PRIOR b.col1)
    

    Although you need to do here is to check that CONNECT it BY SELECT, returns records you wait first, then the DELETION should work too.

  • How to convert pictures from iPhoto?  I need general info and advice.  My library is huge (95 GB).  I am running OSX El Capitan 10.11.6 on iMac.

    How to convert pictures from iPhoto?  I need general info and advice.  I saw the help info but I am very nervous to take on this project, as my library is huge (95GB), organized in several events and albums.  My library is saved (Time Machine SimpleSave HD).  I am running OSX El Capitan 10.11.6 on iMac.

    Have you seen this document?   Updated Photos for OS X - Apple iPhoto support

    https://support.Apple.com/en-GB/HT204655

    Is your iPhoto Library Library on your system drive in the pictures folder? And you have a lot of free space on your system drive? The migration will need additional temporary storage.

    Then drag the iPhoto library icon pictures open to create a new library of Photos of her.

    Your albums appear unchanged in the Photos.  Events will appear as additional albums, because the pictures has no events.  See this link: How Photos handles content and metadata for iPhoto and Aperture - Apple Support

  • Problems of conversion of PDF to MS Word document.  I managed to convert 4 files and now the subsequent files generate a "Conversion failed" error when you try to convert the file.  I have a big manuscript and I separated each chapter to assist with co

    Problems of conversion of PDF to MS Word document.  I managed to convert 4 files and now the subsequent files generate a "Conversion failed" error when you try to convert the file.  I have a big manuscript and I separated each chapter to help the conversion; as I said, the first 4 pieces without problem, then the conversion failure.  I tried to convert the document integer and same result.  Specifically, I bought the feature export to Word.  Please help.  I had initially export the Word Perfect PDF document and attempting to pass PDF to MS Word.

    Hi sdr2014,

    I'm sorry to hear that your conversion process is at a standstill. It seems that the problem is not specific to a single file, you have been unable to convert anything, since the first four chapters of a correct conversion.

    So, let's try this:

    If you want to convert via the ExportPDF site, please sign out, clear the browser cache, and then reconnect. If you use the drive, please choose Help > updates to ensure that you have installed the latest version.

    Please let us know how it goes.

    Best,

    Sara

  • How to find the right server to use windowsmail to send and receive e-mails?

    How to find the right server to use windowsmail to send and receive e-mails?

    Who is your current e-mail server? (Which is after the @ in your address).
     

Maybe you are looking for

  • How can I save displaced table icons?

    I re - arranged at my table I like icons, as a result of recent technical assistance when they were all changed on the way in which the technical man believed better. When I shut down the computer, they are all back at the way he left them. I want to

  • WindowsUpdate_80200001""WindowsUpdate_dt000"

    I try to install updates from windows (cannot install remotely like ' check for Updates ' does not stop even after days) and of many updates that were supposed to be installed when I shut down my computer failed due to this error. How should I do? An

  • Unwanted bold font

    I work with Roboto police in Word and trying to create a PDF using Acrobat Pro DC. Is to convert all fonts except the italics in bold. How can I solve this problem? I already checked the embedded font settings, and it's all good.

  • Is there an alternative Windows to LiveType? I use first Pro CC 2015

    I edit a lot of video and I don't want the answer stock of 'use After Effects '.I need and am sure many others would want something that can be used in PP.Any suggestions?I'm a big fan of Adobe and their many excellent products - but stand alone edit

  • I have a free 30 day trial of the creative cloud I want to disable. How do I do that?

    I have a free 30 day trial of the creative cloud I want to disable. How do I do that?