READBINARY and HEX values.

I have a small JPG that I've converted into a RAW RGB format.
I've tried every combination of TOBASE64(), FORMATBASEN(), and
TOSTRING() that I can think of but still can't read the values.
For instance, if I open the .RAW file in PaintShop Pro, I can
see that the first pixel at (1,1) has an RGB set of 84,82,73. If I
open the JPG and look at the same pixel, the same RGB value of
84,82,73 which is kind of brownish grey.
If I open the .RAW is a hex editor, I can see the hex values
as "84-82-73-82-88-79-8c",etc. So, I would like to use
CFFILE/READBINARY to read the first set of RGB values. In reality,
I would like to read all sets of RGB values, three at a time.
How is this done?
Gracias.

Have you had a look at Christian Cantrell's method of
Using
ColdFusion to Write Out Binary Data. You could then just put
the number of bytes in place of
arrayLen(pic), remembering that one RGB set is 3 bytes.

Similar Messages

  • Formula nodes and hex values: strange behavior?

    Hi all,
    I am having problems using hex values in a formula node. It appears that the hex values are converted to decimal and then assigned to the variable. For example, if I initialize an int8 in a formula node to 0xFE (should be -2), I get 127 (the highest positive value an int8 can have). In order to get -2, I must initialize the variable to -0x02. However, if I initialize the variable to -2 decimal and view it in a indicator in hex, it displays the correct 0xFE. Is this typical behaviour? I didn't think negative hex values were used and I can't find it documented anywhere. Here is a VI that shows the "problem".
    Thanks!
    Attachments:
    Formula Node Example.vi ‏7 KB
    Formula Node Example.png ‏31 KB

    Hi brett,
    int8 test = 0xFE
    You defined a variable to be of type I8, but then you want to assign a value out of range of that datatype. LabVIEW will coerce the value to fit the datatype resulting in 0x7F stored in test.
    int16 test2 = test
    Now you copy the value stored in test over to test2. Why do you even expect a value of 0xFE here? In the line before you stored 0x7F in test, so test2 will also have the value 0x7F!
    int8 test3 = -0x02
    This was explained before…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Assigning a hex value to a variable and getting binary value of a variable.

    I try to develop java programs and I need to do a conversion unicode to EBCDIC and vice versa.
    How can I assign hex values to variables to build UTF-EBCDIC and EBCDIC-UTF table and get hex or binary value of data to compare it to value of in the table?
    I did a conversion like this with PL/1 before. I do not know how can I do it with Java. Because I am new to Java.
    Thank you in advance.

    I will run java code in mainframe and java uses
    unicode for data in default and mainframe environment
    is EBCDIC. So I have to translate the data from
    unicode to ebcdic.I said I think String supports EBCDIC encoding...
    String ebcdic = new String(ebcdicBytes, "Cp500");
    http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html

  • How to sum space delimited hex values in a string, and do other stuff?

    Hello
    I am trying to write a Bourne shell script that takes a non-constant-length character string as input, converts each character to hexidecimal value, sums each value, takes the two's complement of the sum, logically ANDS it with FF, and if any of the resultant "nibbles" are a-f, print/save that nibble as A-F, for later display as a two-character-long character string
    For example, assume a variable (as in non-constant) length variable $A
    A="w04:0;2"
    the road that I started down was to define
    B=$( echo $A | od -An -t x1 -N"${#A}" )
    # for this example, $B=77 30 34 3a 30 3b 32
    It's the middle part where I need some magic. What I want to do is add the whitespace-delimited hex values of this string, for this example
    C=77+30+34+3a+30+3b+32
    so for this example, $C=1b2
    then take two's complement of $C; for this example, $TWOS_COMP=ffff ffff ffff ffe4e
    and logically AND it with FF; for this example, almost-final answer is 4e
    then save final result as uppercase character string variable (for this example, variable's contents would be 4E)
    Is what I'm trying to do intuitively obvious to any of you gurus out there, that could rattle off an answer? I'm okay with trashing my approach thus far and trying something totally different, within the constraint that it run inside a Bourne shell script.
    Thanx in advance, if anybody can help!

    I've made progress. I've converted each character of a non-constant-length string $A into a space-delimited string of hex values, added them up, and retained the least significant byte (i.e., the 8 least significant bits). Here's how:
    B=$( echo $A | od -An -t x1 -N"${#A}" )
    D=0
    for C in $B; do
      C=0x$C
      D=$(($D + $C))
    done
    D=$(($D & 16#FF))
    D=`echo "ibase=10;obase=16;$D" | bc`
    The missing piece now is how to take the two's complement of $D. Anybody out there with any ideas on how to handle the two's complement piece inside a Bourne shell?
    Thanx

  • How do I read a hex value and then convert to the binary equivalent?

    I am reading hex values from a register on my unit under test. I only want to monitor certain bits in the hex value to check a status. I have everything down to run the program except how to read my hex values in binary form. Any suggestions out there?

    If this is just a matter of display, then right click and choose "Format & Precision...". Beware, this works only with integer indicators (I8/16/32 and U8/16/32).
    If the problem is to extract a bit value in a specific position, then go to the "Advanced >> Data manipulation" sub-palette where are all bit manipulation functions (rotate, shift, split...).
    Don't forget either the logical functions (And, Or...) in the boolean sub-palette, where is also the "number to boolean array" function (to be used in conjunction with an index array node).
    Another option is to use string conversion functions, in the "String >> String/Number conversion" sub palette.
    Have a look to the attached image.
    Enough ?
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Hex_&Bin.tif ‏20 KB

  • Hex value to Hex display

    I read in a text document from a server different HEX values ​​depending on the equipment i used. The Hex value is sent to a VI for TMT commands.
    And the entrance which must be presented as HEX display.
    I want to "convert" an appended path string with HEX value for example (0000 3D11 03) to HEX display (0000 3D11 03)

    Duplicate Post
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • How to Pass a HEX-Value to AdobeLifeCycle (TA:SFP) .

    Hello all,
    how to pass a HEX-Value to print a BLACK RIGHT-POINTING TRIANGLE?
    I want to pass a HEX value to AdobeLifeCycle (TA:SFP).
    This is done as follwoing:
    *-- Variablen
    DATA hex(2) TYPE x.
    SET BIT: 01 OF hex TO 0,
             02 OF hex TO 0,
             03 OF hex TO 1,
             04 OF hex TO 0,
             05 OF hex TO 0,
             06 OF hex TO 1,
             07 OF hex TO 0,
             08 OF hex TO 1,
             09 OF hex TO 1,
             10 OF hex TO 0,
             11 OF hex TO 1,
             12 OF hex TO 1,
             13 OF hex TO 1,
             14 OF hex TO 0,
             15 OF hex TO 1,
             16 OF hex TO 0.
    The HEX-VALUE ist u201E25BAu201C from the codepage 4110 = BLACK RIGHT-POINTING TRIANGLE, (use TA:SPC to see it).
    I set the HEX-VALUE before i call the PDF-OUTPUT:
    move hex to ls_frmglobal-hex. u201E(the field ist defined as u201ERAWSTRINGu201C)
    Then i call the Output;
    Now call the generated function module
    CALL FUNCTION fm_name
      EXPORTING
        /1bcdwb/docparams = fp_docparams
        frmglobal         = ls_frmglobal
        frmisu            = ls_frmisu
        frminf            = ls_frminf
        connections       = connections
        t_sums            = t_sums
      EXCEPTIONS
        usage_error       = 1
        system_error      = 2
        internal_error    = 3
        OTHERS            = 4.
    The result is u201E25BAu2018 instead of the BLACK RIGHT-POINTING TRIANGLE.
    Can any one have a idea what is goning wrong?
    I know how to print a Triangle on the Designer the quetion is how to pass the Hex-Value from a different codepage than the Stanndard codepage which we use.
    Thanks and regards
    Ibrahim

    I am trying to match \xfa which means that match faas
    a hex value.
    All I want to know is how to use the RE class tocheck
    for a cetain hex value.
    Correction:
    If the data is numeric, it can be matched using a hex,
    or octal representation for the regular
    expression. for instance, the numeric value 6 will be
    matched with either of the following regexes (hex,
    and octal, respectively). Read the API for
    the Pattern class if this doesn't make sense.
    "\06"
    "\006"(Should have checked first...)

  • How to Convert a HEX value to CHAR value...Unicode Issue...

    Hi,
    How can I convert HEX value to CHAR value.
    The Code in <b>non Unicode</b> system is:
    DATA: t_text LIKE tline OCCURS 0 WITH HEADER LINE.
    constants:   c_hex_20a5(2) TYPE x            VALUE '20A5'.
    t_text-tdline = 'seller of the item so listed.  A legend of the Seller Code(s) is as'.
          TRANSLATE t_text-tdline USING c_hex_20a5.
    The same code give error in <b>Uni-Code</b> system:
    <b>error is "c_hex_20a5 must be an character type object (C, N, D, T or String type)."</b>
    If anyone know, what is the solution, please let me know.
    Thanks!
    Puneet.

    Hi,
    Try declaring the Hex chars using the ABAP char utilities. This is just a sample piece of code on how to declare and use:
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    DATA:  ws_lf TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    data:    c_newline           TYPE x VALUE '0D'.  [ it is zero D, for carriage return ]
    ws_lf = c_newline.
        CONCATENATE it_tab-maktx
                    ws_lf
                    ws_template
                    INTO it_notificatn-template.
    Hope this helps...
    Regards
    Subramanian

  • Converting a hex String to its corresponding hex value...?

    Yeah, I'm having quite a bit of fun guessing this one... :p
    I have a string of n characters and have used Integer.toHexString( ( int )str.charAt( i ) ) to convert each character to a string representing its hex value. Now I need to USE that value for bit-wise operations, like, say, applying the AND, OR, etc. operators...
    Example:
    hexvalue &= 0xC000FFFF; //the second value is the one extracted from the string;
    How can achieve this...? Any help is greatly appreciated... :}

    Since a Java char is numerically a Java short, you can apply bitwise operators to chars directly - the conversion to hex simply changes the way that the char is viewed; the result can also be viewed as a number in other bases.
    For instance, the char 'A' can be also be represented as any of the following values:
    binary - 1000001
    octal - 101
    decimal - 65
    hex - 41
    Likewise, 'Z' can also be viewed as
    binary - 1011010
    octal - 132
    decimal - 90
    hex - 5A
    "Anding" the letter 'A' with 'Z' ('A' & 'Z') or doing the same using any of the other representations will result in (binary 1000000, octal 100, decimal 64, or hex 40) - the bit pattern is the same, only the representation of the result varies.

  • Adobe Illustrator CC 2014 not allowing me to change colors by typing in a precise hex value.

    Over the last two days, I have lost the ability to type in a hex value to the color picker to change an object's color.  Anyone else experience this and know of fixes?  I can select from the pre-made swatches or gradient-color picker field, but I need to be able to enter precise hex values per my style guide.

    JWoo,
    What happens if you use the Web Safe RGB from the Color palette flyout and insert the values there?
    For failures in general, you may try the list.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save curent artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • How to add HEX values in a Report.

    I have a special requirement. I need to add hex values in a report. To be specific, the special HEX characters: 0D 0A 0C 0C, has to be added to TOP of PAGE event.
    Drawing What I want will be something like that:
    CR/LF FF/FFABCDEFHGIJKLMNOZVCXC 
    This is a Report that has to be send to the spool. Once in the spool will be converted to TXT file. I created a small code using print control function but still It is doesn’t working.
    I defined a print control ZPAGE as ‘0D 0A 0C 0C’.
    Any idea how to do this?.
    ** This report doesn’t include the Top-of Page event.
    ** Example Report.
    REPORT  ZCAPRTHEX2 NO STANDARD PAGE HEADING.
    Data: String1(120) type c value 'ABCDEFHGIJKLMNOZVCXC'.
    WRITE : /.
    PRINT-CONTROL FUNCTION 'ZPAGE'.
    WRITE : string1.
    This is what I see in SP01 as HEX View
    ABCDEFHGIJKLMNO ZVCXC #ZPAGE

    If you download spool to file like that, you are still getting the spool in SAP format, it's not going to have the hex chars. You need to print the file by clicking on printer button. SAP generates file in printer readable format and send it to printer. I'm refering to that file.
    Ask your basis folks to write the spool output reqest file to a file instead of sending to the printer. Open that file in hex viewer.
    Regards
    Sridhar

  • What Hex is going on with Hex Values?

    I used a web hex code to match up a color in a logo. (8700ff)
    However, now that i am in the process of designing its seems that my PS hex values are not the same as web hex values. Is theere a setting that i need to get into to make these match?
    Look at the words '' SILVER & HD CAMERAS '' as compared to the words '' The Buffalo Nickle ''. These both are set at a hex value of 8700ff.
    The color of "HD CAMERA" is corectly matching the site logo which was made in PS cs5. But the sites interputaion of that same Hex value is different. (Buffalo Nickle)

    PECourtejoie, 
    Mylenium
    Here are some screen shots from my color setups. It seems to be using sRGB. How would i change these to get more consistent color.
    My opera browser was the only one that wasn't color manage per the article Vaskania referenced. I only use firefox for editing and Safari for preview.
    I am probably gonna change the hex code for the lighter purple that is in the phrase Buffalo Nickle to match the png i created in PS.
    I am also wondering if saving the image as a png through a "save as" comand is as good as saving that image via "Save for Web & Devices".
    I was told that i should never use jpeg on a web image for load reason. So now I only use jpeg on the image if there is a lot of gradients in that image. For me this means that 90% of the images i have used on about 250 sites are through "save as". I never had a or never really noticed this problem before.
    Looking at my PS color settings what needs to be changed?
    Keep in mind that i use PS for video images/elements as well.

  • Hex values in byte

    I need to encode a message string that consists of a byte array to be sent to a device.
    Two of the items are numeric values that are to be represented as hex 0x00 - 0xFF.
    This needs to be placed into a single byte.
    My question is this, can I use a short for my numeric value and then cast that value to byte like this
    short s = 200;
    byte b = (byte)s;
    With this fill the byte with the hex value 0xC8
    If not, how can I do this?
    Thanks

    burferd wrote:
    My question is this, can I use a short for my numeric value and then cast that value to byte like this
    short s = 200;
    byte b = (byte)s;Yes and no. You'll get the byte 0xC8 into b that way, but its numerical value will be -56, not 200. Since you want an array of bytes, I assume this won't matter.
    But why do you want to do it that way anyway? And why a short, not an int?
    And by the way, 0xC8 is also a "numeric value".

  • Trying to establish Colour Hex Value for edge of image

    Using style no.11 and tinkering with the colour I've created
    a couple of tiles that I can use to display as a background in my
    header and left hand column.
    I need to specify a backgound colour in my Style sheet to
    match the edge of the graphics, but I'm having a bit of trouble
    determining the Hex value of the pixels.
    I've tried looking at the file as a bitmap, but it doesn't
    seem to show hex values in this format.
    I'd be grateful If anyone can suggest the technique required
    for this process.
    Thanks,
    Myles

    Opened the Lemon image file.
    Copied the background layer by dragging it to the little folder icon at the bottom of the layers palette. (I then double-clicked on the name and called it "Image layer" you don't have to, but I like to name layers as a matter of course.)
    Selected the Background layer and filled it with white*.
    Selected the Image layer and added a layer mask by clicking on the little mask icon at the bottom of the layers palette (3rd from left).
    Took the gradient tool and chose black to white (should be the default). Drew the tool across the image to fill the mask (making sure the mask is selected in the layers palette.)
    Voilá!
    You can keep the layered image by doing a "Save for Web" which will prepare the file for the web page.
    *If your web page had a different colour you could use that here.

  • Paint Bucket not previewing accurate colors/Hex values

    Hello,
    I recently installed CS5.5 on my son's macbook pro with retina (10.9.5) and he is trying to use Flash. However, when he selects the rectangle next to the paint bucket and then moves the cursor down to the palette that popped up, neither the hex value nor the color in the rectangle change to reflect the color under the eye dropper. I also have CS5.5 installed on my macbook pro (10.8.5) and it works perfectly and displays colors perfectly. Any idea what's going on? Is there a setting that I am missing to turn this on/off?
    Thanks for any help!!!
    JG

    Here is a photo to better show the issue:

Maybe you are looking for

  • A DVD external super drive on a Macbook-pro 15', any chance to work?

    Hey! I bought a macbook-pro 15' in 2009 which does generally well. Nevertheless it has a problem concerning the DVD internal drive. It doesn't read   anymore and I have tried to clean with no effect. Few days ago I bought an external USB super drive

  • Laser Jet CP1215 Color Matching Issues;

    Colors are abnormally darker than the photos, art and copy especially those in red.They appear to be redishbrown. But, not all the photos/art on a page are effected. I have been working with HP Thech service guy who has put me through several days of

  • Project Wise Vendor Outstanding Report

    Hi PS Experts , We have implemented PS ,MM, FICO Module . My requirement is to show the Project Wise Vendor Outstanding Balances . The Item posted in BSIK and BSAK tables are not populated with  neither Network nor WBS Element . Could you please sugg

  • How to calculate this column (Last Week of month)?

    I have a request where it shows some calculations month wise ex. This report is for Dec-2010 reporting line | Declined Rate | Approved Rate | Last-Week Declined Rate | Report Asia---| ------20%----- | -----45%-------- | --------4%------ | Report Afri

  • Issue installing Dreamweaver Cs4 in Windows 7

    grettings to everyone: After I sucessfully Dreamweaver CS4 in Windows 7, when I try to open it shows a message of side-by-side missconfiguration. I went to the log viewer and this is the general information for it: quote: Activation context generatio