WE are migrating the application from Jboss & to wildfly 19 , deployments are failing with below MQ related errors . I've no clue about these errors complaining about the library file missing in the server . Can some one assist me on this.
WIldfly-19
Open JDK 8
MQ adapter : wmq.jmsra.rar
[23/03/21 15:53:13.840.00] 0001 ] [com.ibm.mq.jmqi.local.LocalMQ$3] at:
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1244)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1085)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ$1.run(LocalMQ.java:289)
[23/03/21 15:53:13.840.00] 0001 java.security.AccessController.doPrivileged(Native Method)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.initialise_inner(LocalMQ.java:281)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.initialise(LocalMQ.java:244)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.<init>(LocalMQ.java:1330)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalServer.<init>(LocalServer.java:206)
[23/03/21 15:53:13.840.00] 0001 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[23/03/21 15:53:13.840.00] 0001 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[23/03/21 15:53:13.840.00] 0001 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[23/03/21 15:53:13.840.00] 0001 java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:681)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:615)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:525)
[23/03/21 15:53:13.840.00] 0001 com.ibm.msg.client.wmq.factories.WMQComponent.getImplementationInfo(WMQComponent.java:191)
[23/03/21 15:53:13.840.00] 0001 com.ibm.msg.client.commonservices.trace.Trace.getVersion(Trace.java:1994)
[23/03/21 15:53:13.840.00] 0001 com.ibm.msg.client.commonservices.trace.Trace.setOn(Trace.java:558)
[23/03/21 15:53:13.840.00] 0001 com.ibm.msg.client.services.Trace.setStatus(Trace.java:101)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.connector.services.JCATraceAdapter.enableTrace(JCATraceAdapter.java:237)
[23/03/21 15:53:13.840.00] 0001 Object ClassLoader = ModuleClassLoader for Module "deployment.wmq.jmsra.rar" from Service Module Loader
[23/03/21 15:53:13.840.00] 0001 CurrentThread ClassLoader = ModuleClassLoader for Module "deployment.wmq.jmsra.rar" from Service Module Loader
[23/03/21 15:53:13.840.00] 0001 Cause:
[23/03/21 15:53:13.840.00] 0001 no mqjbnd in java.library.path [java.lang.UnsatisfiedLinkError] at:
[23/03/21 15:53:13.840.00] 0001 java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
[23/03/21 15:53:13.840.00] 0001 java.lang.Runtime.loadLibrary0(Runtime.java:871)
[23/03/21 15:53:13.840.00] 0001 java.lang.System.loadLibrary(System.java:1124)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1206)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1085)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ$1.run(LocalMQ.java:289)
[23/03/21 15:53:13.840.00] 0001 java.security.AccessController.doPrivileged(Native Method)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.initialise_inner(LocalMQ.java:281)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.initialise(LocalMQ.java:244)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalMQ.<init>(LocalMQ.java:1330)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.local.LocalServer.<init>(LocalServer.java:206)
[23/03/21 15:53:13.840.00] 0001 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[23/03/21 15:53:13.840.00] 0001 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[23/03/21 15:53:13.840.00] 0001 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[23/03/21 15:53:13.840.00] 0001 java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:681)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:615)
[23/03/21 15:53:13.840.00] 0001 com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:525)
[23/03/21 15:53:13.840.00] 0001 com.ibm.msg.client.wmq.factories.WMQComponent.getImplementationInfo(WMQComponent.java:191)
[23/03/21 15:53:13.840.00] 0001 com.ibm.msg.client.commonservices.trace.Trace.getVersion(Trace.java:1994)
[23/03/21 15:53:13.840.00] 0001 Object ClassLoader = null
[23/03/21 15:53:13.840.00] 0001 CurrentThread ClassLoader = ModuleClassLoader for Module "deployment.wmq.jmsra.rar" from Service Module Loader
[23/03/21 15:53:13.841.00] 0001 #48998340 c.i.m.jmqi.local.LocalServer(LocalMQ) ! loadLib(Adapter)<throwIndex 2>,
[23/03/21 15:53:13.841.00] 0001 [CC=2;RC=2495;AMQ8598:
[23/03/21 15:53:13.841.00] 0001 -----------------------------------------------------------------------
[23/03/21 15:53:13.841.00] 0001 | Failed to load the WebSphere MQ native JNI library: 'mqjbnd'.
[23/03/21 15:53:13.841.00] 0001 |
[23/03/21 15:53:13.841.00] 0001 | The JVM attempted to load the platform native library 'mqjbnd',
[23/03/21 15:53:13.841.00] 0001 | which was mapped to the filename: 'libmqjbnd.so'.
[23/03/21 15:53:13.841.00] 0001 |
[23/03/21 15:53:13.841.00] 0001 | When attempting to load the library, the JVM reported the error
[23/03/21 15:53:13.841.00] 0001 | message:
[23/03/21 15:53:13.841.00] 0001 | 'no mqjbnd in java.library.path'
[23/03/21 15:53:13.841.00] 0001 |
[23/03/21 15:53:13.841.00] 0001 | The JVM's bit-size is: '64'
[23/03/21 15:53:13.841.00] 0001 |
[23/03/21 15:53:13.841.00] 0001 | The library path which was used to locate this library was:
[23/03/21 15:53:13.841.00] 0001 | '*** Configured java.library.path **********************************
[23/03/21 15:53:13.841.00] 0001 | "/usr/java/packages/lib/amd64"
[23/03/21 15:53:13.841.00] 0001 | "/usr/lib64"
[23/03/21 15:53:13.841.00] 0001 | "/lib64"
[23/03/21 15:53:13.841.00] 0001 | "/lib"
[23/03/21 15:53:13.841.00] 0001 | "/usr/lib"
[23/03/21 15:53:13.841.00] 0001 | ********************************************************************'
Standalone-full-ha.xml
<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">
<resource-adapters>
<resource-adapter id="wmq.jmsra.rar">
<archive>
wmq.jmsra.rar
</archive>
<transaction-support>NoTransaction</transaction-support>
<config-property name="connectionConcurrency">5</config-property>
<config-property name="reconnectionRetryCount">5</config-property>
<config-property name="logWriterEnabled">true</config-property>
<config-property name="startupRetryCount">1</config-property>
<config-property name="traceEnabled">true</config-property>
<config-property name="traceLevel">3</config-property>
<config-property name="maxConnections">25</config-property>
<config-property name="reconnectionRetryInterval">300000</config-property>
<connection-definitions>
<connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:jboss/WMQConnectionFactory" pool-name="WMQConnectionFactory">
<config-property name="channel">CL.SC1023AC.TIMS</config-property>
<config-property name="hostName">sc1023ac.domain.com</config-property>
<config-property name="transportType">Client</config-property>
<config-property name="queueManager">SC1023AC</config-property>
<config-property name="port">49400</config-property>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/queue/PurchaseOrderExportQueue" pool-name="purchaseOrderExport">
<config-property name="baseQueueName">RQ.SCCO4234</config-property>
</admin-object>
Related
I'm reading the wikipedia article on Master Boot Record and specifically curious about what (if anything) needs to be in the "bootstrap code area" for the MBR to be readable in modern systems. I used parted to create an MBR on an SD card then used xxd /dev/mmcblk0 to peek at the raw data that was written. I can see:
partition entries at 0x01BE and 0x01CE
boot signature 0x55AA at 0x01FE-0x01FF
But what is the meaning of the data from 0x0000 through 0x01BD?
Example:
00000000: fab8 0010 8ed0 bc00 b0b8 0000 8ed8 8ec0 ................
00000010: fbbe 007c bf00 06b9 0002 f3a4 ea21 0600 ...|.........!..
00000020: 00be be07 3804 750b 83c6 1081 fefe 0775 ....8.u........u
00000030: f3eb 16b4 02b0 01bb 007c b280 8a74 018b .........|...t..
00000040: 4c02 cd13 ea00 7c00 00eb fe00 0000 0000 L.....|.........
00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000130: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000140: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000170: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000190: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001b0: 0000 0000 0000 0000 fed0 4bb2 0000 8020 ..........K....
000001c0: 2100 8328 0d0c 0008 0000 f1f2 0200 0003 !..(............
000001d0: c2eb 8303 c1eb f1fa 0200 0000 6000 0000 ............`...
000001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001f0: 0000 0000 0000 0000 0000 0000 0000 55aa ..............U.
Some context: This is a disk image for a bootable SD card in a Beablebone-like ARM/Linux SBC. But since the MBR is architecture/ OS independent, I assume - at least on ARM - there is no actual machine code in the "bootstrap code area." Is it x86/ BIOS machine code that exists by convention and is ignored on ARM?
If I wrote arbitrary data in 0x100-0x150 would the MBR still be readable?
I created an AVI file by rendering the frames using Cairo. The AVI generation code is part of an OCaml library. However, ffmpeg and vlc both yield only the very first frame. If I cut the avi header and use ffplay with the proper codec options, I can view the movie just fine.
What causes ffmpeg to think this file has only one frame?
The header of the file looks like this:
0000000 4952 4646 d0e0 0278 5641 2049 494c 5453
0000010 00c0 0000 6468 6c72 7661 6869 0038 0000
0000020 a2c2 0000 0000 0000 0000 0000 0100 0000
0000030 003c 0000 0000 0000 0001 0000 0000 0000
0000040 01e0 0000 01e0 0000 0000 0000 0000 0000
0000050 0000 0000 0000 0000 494c 5453 0074 0000
0000060 7473 6c72 7473 6872 0038 0000 6976 7364
0000070 4752 2042 0000 0000 0000 0000 0000 0000
0000080 000a 0000 00f0 0000 0000 0000 003c 0000
0000090 2000 00fd 0000 0000 0001 0000 0000 0000
00000a0 01e0 01e0 7473 6672 0028 0000 0028 0000
00000b0 01e0 0000 01e0 0000 0001 0018 0000 0000
00000c0 8c00 000a 0000 0000 0000 0000 0000 0000
00000d0 0000 0000 494c 5453 d00c 0278 6f6d 6976
00000e0 3030 6364 d000 0278 0000 0000 0000 0000
00000f0 0000 0000 0000 0000 0000 0000 0000 0000
I found the answer. Something not mentioned in the docs I read was that the stream itself needs to be encoded as a list of CHUNKS. So every frame shall be one CHUNK. This is, of course, not necessary in principle, but seems to be a very common convention.
I thinks this is a strange question, but now I prepare to hand-made a minimal Mach-O 64 binary, like the same problem on ELF (http://timelessname.com/elfbin/).
But currently I still sucks on how to debug my binary. otool does NOT show me the error, but I get the suck how to debug the binary. The following is the binary I make in hex view. In the current stage I've no idea how to continue. Any suggestion? or I should stop this stupid things...
0000000: cffa edfe 0700 0001 0300 0080 0200 0000 ................
0000010: 0900 0000 0002 0000 8500 0000 0000 0000 ................
0000020: 1900 0000 4800 0000 5f5f 5041 4745 5a45 ....H...__PAGEZE
0000030: 524f 0000 0000 0000 0000 0000 0000 0000 RO..............
0000040: 0000 0000 0100 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 0000 0000 1900 0000 9800 0000 ................
0000070: 5f5f 5445 5854 0000 0000 0000 0000 0000 __TEXT..........
0000080: 0010 0000 0000 0000 0010 0000 0000 0000 ................
0000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000a0: 0700 0000 0500 0000 0100 0000 0000 0000 ................
00000b0: 5f5f 7465 7874 0000 0000 0000 0000 0000 __text..........
00000c0: 5f5f 5445 5854 0000 0000 0000 0000 0000 __TEXT..........
00000d0: 1010 0000 0000 0000 1000 0000 0000 0000 ................
00000e0: 2002 0000 0100 0000 0000 0000 0000 0000 ...............
00000f0: 0004 0080 0000 0000 0000 0000 0000 0000 ................
0000100: 1900 0000 4800 0000 5f5f 4c49 4e4b 4544 ....H...__LINKED
0000110: 4954 0000 0000 0000 0000 0000 0000 0000 IT..............
0000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000130: 0000 0000 0000 0000 0700 0000 0100 0000 ................
0000140: 0000 0000 0000 0000 2200 0080 3000 0000 ........"...0...
0000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000170: 0000 0000 0000 0000 0200 0000 1800 0000 ................
0000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000190: 0b00 0000 5000 0000 0000 0000 0000 0000 ....P...........
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001e0: 1b00 0000 1800 0000 506f 7765 7265 6420 ........Powered
00001f0: 6279 2063 6d6a 0000 2400 0000 1000 0000 by cmj..$.......
0000200: 000a 0a00 000a 0a00 2800 0080 1800 0000 ........(.......
0000210: 2002 0000 0000 0000 0000 0000 0000 0000 ...............
0000220: 48c7 c001 0000 0248 c7c7 0400 0000 0f05 H......H........
0000230: 0a .
[UPDATE]
My environment is Mac OSX 10.10 which the online information does not workable in my case (e.g. https://gist.github.com/softboysxp/1084476)
You cannot go below the 4096 byte limit since Yosemite 10.10.5. Its Mach-O kernel checks are more restrictive now. Alternatively to dyld and LC_MAIN, you can go for LC_UNIXTHREAD and obviously keeping your LC_SEGMENT64. Sections are not necessary, but dropping them will make tracking the binary harder.
Since El Capitan, PAGEZERO with nonzero size is required for 64-bit executables.
Here is a working HelloWorld example, valid on Sierra 10.12.2 assembled with NASM or YASM
; A minimal Mach-o x64 executable for OS X Sierra
; $ nasm -f bin -o tiny_hello tiny_hello.s
; $ chmod +x tiny_hello
; Constants (For readability)
%define MH_MAGIC_64 0xfeedfacf
%define CPU_ARCH_ABI64 0x01000000
%define CPU_TYPE_I386 0x00000007
%define CPU_TYPE_X86_64 CPU_ARCH_ABI64 | CPU_TYPE_I386
%define CPU_SUBTYPE_LIB64 0x80000000
%define CPU_SUBTYPE_I386_ALL 0x00000003
%define MH_EXECUTE 0x2
%define MH_NOUNDEFS 0x1
%define LC_SEGMENT_64 0x19
%define LC_UNIXTHREAD 0x5
%define VM_PROT_READ 0x1
%define VM_PROT_WRITE 0x2
%define VM_PROT_EXECUTE 0x4
%define x86_THREAD_STATE64 0x4
%define x86_EXCEPTION_STATE64_COUNT 42
%define SYSCALL_CLASS_SHIFT 24
%define SYSCALL_CLASS_MASK (0xFF << SYSCALL_CLASS_SHIFT)
%define SYSCALL_NUMBER_MASK (~SYSCALL_CLASS_MASK)
%define SYSCALL_CLASS_UNIX 2
%define SYSCALL_CONSTRUCT_UNIX(syscall_number) \
((SYSCALL_CLASS_UNIX << SYSCALL_CLASS_SHIFT) | \
(SYSCALL_NUMBER_MASK & (syscall_number)))
%define SYS_exit 1
%define SYS_write 4
; NASM directive, not compiled
; Use RIP-Relative addressing for x64
BITS 64
;DEFAULT REL
%define __origin 0x100000000
org __origin
; Mach-O header
DD MH_MAGIC_64 ; magic
DD CPU_TYPE_X86_64 ; cputype
DD CPU_SUBTYPE_LIB64 | CPU_SUBTYPE_I386_ALL ; cpusubtype
DD MH_EXECUTE ; filetype
DD 3 ; ncmds
DD __COMMANDSend - __COMMANDSstart ; sizeofcmds
DD MH_NOUNDEFS ; flags
DD 0x0 ; reserved
__COMMANDSstart:
___PAGEZEROstart:
DD LC_SEGMENT_64 ; cmd
dd ___PAGEZEROend - ___PAGEZEROstart ; command size
hello_str:
db '__PAGEZERO',0x0,0,0,0,0,0 ; segment name (pad to 16 bytes)
DQ 0x0 ; vmaddr
DQ __origin ; vmsize
DQ 0 ; fileoff
DQ 0 ; filesize
DD 0 ; maxprot
DD 0 ; initprot
DD 0x0 ; nsects
DD 0x0 ; flags
___PAGEZEROend:
; Segment and Sections
___TEXTstart:
DD LC_SEGMENT_64 ; cmd
dd ___TEXTend - ___TEXTstart ; command size
db '__TEXT',0,0,0,0,0,0,0,0,0,0 ; segment name (pad to 16 bytes)
DQ __origin ; vmaddr
DQ ___codeend - __origin ; vmsize
DQ 0 ; fileoff
DQ ___codeend - __origin ; filesize
DD VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE ; maxprot
DD VM_PROT_READ | VM_PROT_EXECUTE ; initprot
DD 0x0 ; nsects
DD 0x0 ; flags
___TEXTend:
__UNIX_THREADstart:
; UNIX Thread Status
DD LC_UNIXTHREAD ; cmd
DD __UNIX_THREADend - __UNIX_THREADstart ; cmdsize
DD x86_THREAD_STATE64 ; flavor
DD x86_EXCEPTION_STATE64_COUNT ; count
DQ 0x0, 0x0, 0x00, 0x0 ; rax, rbx , rcx , rdx
DQ 0x01, hello_str, 0x00, 0x00 ; rdi = STDOUT, rsi = address of hello_str, rbp, rsp
DQ 0x00, 0x00 ; r8 and r9
DQ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ; r10, r11, r12, r13, r14, r15
DQ ___codestart, 0x00, 0x00, 0x00, 0x00 ; rip, rflags, cs, fs, gs
__UNIX_THREADend:
__COMMANDSend:
___codestart: ; 24 bytes
; rdi and rsi have already been set in the initial state
mov rdx, 11
mov rax, SYSCALL_CONSTRUCT_UNIX(SYS_write)
syscall
mov rdi, rax
mov rax, SYSCALL_CONSTRUCT_UNIX(SYS_exit)
syscall
___codeend:
times 4096-($-$$) DB 0;
filesize EQU $-$$
Now I've find the minimal Mach-O 64 binary with 4K size but now I still has some trouble when reduce the size of my binary:
When I reduce the file size, run the binary will get SIGKILL,
When I reduce the value fileoff for segment __LINKEDIT, still get SIGKILL,
When I google it, the value of fileoff is related to the binary size.
So now I've to fill almost 3k \x00 in my binary, and I don't know how to reduce this binary anymore.
0000000: cffa edfe 0700 0001 0300 0080 0200 0000 ................
0000010: 0a00 0000 c002 0000 8500 0000 0000 0000 ................
0000020: 1900 0000 4800 0000 5f5f 5041 4745 5a45 ....H...__PAGEZE
0000030: 524f 0000 0000 0000 0000 0000 0000 0000 RO..............
0000040: 0010 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 0000 0000 1900 0000 9800 0000 ................
0000070: 5f5f 5445 5854 0000 0000 0000 0000 0000 __TEXT..........
0000080: 0010 0000 0000 0000 0010 0000 0000 0000 ................
0000090: 0000 0000 0000 0000 0100 0000 0000 0000 ................
00000a0: 0700 0000 0500 0000 0100 0000 0000 0000 ................
00000b0: 5f5f 7465 7874 0000 0000 0000 0000 0000 __text..........
00000c0: 5f5f 5445 5854 0000 0000 0000 0000 0000 __TEXT..........
00000d0: e012 0000 0000 0000 1000 0000 0000 0000 ................
00000e0: e002 0000 0400 0000 0000 0000 0000 0000 ................
00000f0: 0004 0080 0000 0000 0000 0000 0000 0000 ................
0000100: 1900 0000 4800 0000 5f5f 4c49 4e4b 4544 ....H...__LINKED
0000110: 4954 0000 0000 0000 0000 0000 0000 0000 IT..............
0000120: 0000 0000 0000 0000 0010 0000 0000 0000 ................
0000130: 0000 0000 0000 0000 0700 0000 0100 0000 ................
0000140: 0000 0000 0000 0000 2200 0080 3000 0000 ........"...0...
0000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000170: 0000 0000 0000 0000 0200 0000 1800 0000 ................
0000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000190: 0b00 0000 5000 0000 0000 0000 0000 0000 ....P...........
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001e0: 0e00 0000 2000 0000 0c00 0000 2f75 7372 .... ......./usr
00001f0: 2f6c 6962 2f64 796c 6400 0000 0000 0000 /lib/dyld.......
0000200: 1b00 0000 1800 0000 506f 7765 7265 6420 ........Powered
0000210: 6279 2063 6d6a 0000 2400 0000 1000 0000 by cmj..$.......
0000220: 000a 0a00 000a 0a00 0500 0000 b800 0000 ................
0000230: 0400 0000 2a00 0000 0000 0000 0000 0000 ....*...........
0000240: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000250: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000260: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000270: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000280: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000290: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00002a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00002b0: 0000 0000 0000 0000 e012 0000 0000 0000 ................
00002c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00002d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00002e0: 48c7 c001 0000 0248 c7c7 0400 0000 0f05 H......H........
00002f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000300: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000310: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000320: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000330: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000340: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000350: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000360: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000370: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000380: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000390: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00003a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00003b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00003c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00003d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00003e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00003f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000400: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000410: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000420: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000430: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000440: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000450: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000460: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000470: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000480: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000490: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00004a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00004b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00004c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00004d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00004e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00004f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000500: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000510: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000520: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000530: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000540: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000550: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000560: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000570: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000580: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000590: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00005a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00005b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00005c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00005d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00005e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00005f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000600: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000610: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000620: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000630: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000640: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000650: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000660: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000670: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000680: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000690: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00006a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00006b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00006c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00006d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00006e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00006f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000700: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000710: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000720: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000730: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000740: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000750: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000760: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000770: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000780: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000790: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00007a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00007b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00007c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00007d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00007e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00007f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000800: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000810: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000820: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000830: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000840: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000850: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000860: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000870: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000880: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000890: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000900: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000910: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000920: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000930: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000940: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000950: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000960: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000970: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000980: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000990: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a00: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a10: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a20: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a30: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000a90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000aa0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ab0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ac0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ad0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ae0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000af0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b00: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b10: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b20: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b30: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000b90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ba0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000bb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000bc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000bd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000be0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000bf0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c00: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c10: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c20: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c30: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000c90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ca0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000cb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000cc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000cd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ce0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000cf0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d00: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d10: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d20: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d30: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000d90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000da0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000db0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000dc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000dd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000de0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000df0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e00: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e10: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e20: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e30: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000e90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ea0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000eb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ec0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ed0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ee0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ef0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f00: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f10: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f20: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f30: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000f90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000fa0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000fb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000fc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000fd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000fe0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000ff0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
I just need some clarification on how to properly convert rgb pixel values in the range [0,1] to be in the right range for a HDR format like openEXR.
So I know for instance that when working with low dynamic range formats like PNG or JPG that only have 8 bits per channel, you simply have to multiply each rgb value by 2^8-1 = 255 and clamp so that all your values are in the range [0, 255].
OpenEXR and other HDR formats use a half precision format with 16 bits per channel. So do I just do the same thing as before and multiply each channel by 2^16-1 = 65535 so that my new range becomes [0, 65535]?
EDIT
So I tried doing what I wrote above but when I try to display the openEXR file in photoshop it is completely white. It seems like any value greater than around 10 or so is too bright for photoshop to display properly which I find very odd. So this doesn't seem like the correct way to do it unless there is something wrong with photoshops display.
We are dealing with three related but different issues at the same time.
The first issue is that of range: are channels stored as values in the range [0, 1] or [0, 255] or [0, 65535]. Scaling (multiplying and possibly clamping) is what you do to convert from one range to another.
The second issue is that of raw sample size: how many bits do you use to store the value. This doesn't necessarily have to be the binary logarithm of the size of the range. For example, if your range is [0, 255], you could store the values in 8 bits where the least significant bits represents increments of 1, or in 6 bits where the least significant bit represents increments of 4, or in 10 bits where the least significant bit represents increments of 0.25. In fact, as we will see in the next issue, the increments do not have to be fixed.
The third and final issue is that of encoding: fixed point or floating point. When we say that we store values of [0, 255] in 8 bits or values of [0, 65535] in 16 bits, we usually mean integer encoding (a special case of fixed point where the least significant bit represents fixed increments of 1). When values are stored in the range [0, 1] however, regardless of the raw sample size, usually this implies floating point storage (where most bits are used to store the significand, while a few bits are reserved to store the size of the increment associated with the least significant bit). When we speak of "half precision", "single precision", "double precision", "extended precision" and so forth we also invariably mean floating point encoding.
So here is the catch: OpenEXR uses floating point encoding, in a format that is not built in to most programming languages. Most modern languages only have 64-bit floats, and if they offer anything else it's usually 32-bit floats (respectively double and float in the C family), but 16-bit floats are almost never available out of the box.
Half precision can represent values in the range [-65505, 65504], with 11 bits (slightly better than 3 decimal digits) of precision, while also being able to represent values as small as 2^-14. However, given that OpenEXR is a HDR format, you are probably not really expected to use the entire range because the number encoding is chosen to accomodate for (extreme) over- or underexposure. That is, unless your camera actually produces such an enormous dynamic range of values.
So you might not actually need to scale your channel values. However, given that you already start with values in [0, 1], you probably have floating point numbers stored in single or double precision and you'll have to transcode them to half precision. Depending on the programming language, the libraries and even the hardware platform that you use, there might be an off-the-shelf solution or you might need to do some bit-fiddling of your own. As a starting point I can only offer you this DuckDuckGo search.
I'm too tired to think straight, but this may help you work it all out. I used ImageMagick to create three OpenEXR images, one white, one black and one red, all 1 pixel x 1 pixel.
convert -size 1x1! xc:white white.exr
convert -size 1x1! xc:black black.exr
convert -size 1x1! xc:red red.exr
Then I hexdumped them all:
xxd white.exr > white.txt
xxd black.exr > black.txt
xxd red.exr > red.txt
Here are the files:
White.txt
0000000: 762f 3101 0200 0000 6368 616e 6e65 6c73 v/1.....channels
0000010: 0063 686c 6973 7400 4900 0000 4100 0100 .chlist.I...A...
0000020: 0000 0000 0000 0100 0000 0100 0000 4200 ..............B.
0000030: 0100 0000 0000 0000 0100 0000 0100 0000 ................
0000040: 4700 0100 0000 0000 0000 0100 0000 0100 G...............
0000050: 0000 5200 0100 0000 0000 0000 0100 0000 ..R.............
0000060: 0100 0000 0063 6f6d 7072 6573 7369 6f6e .....compression
0000070: 0063 6f6d 7072 6573 7369 6f6e 0001 0000 .compression....
0000080: 0000 6461 7461 5769 6e64 6f77 0062 6f78 ..dataWindow.box
0000090: 3269 0010 0000 0000 0000 0000 0000 0000 2i..............
00000a0: 0000 0000 0000 0064 6973 706c 6179 5769 .......displayWi
00000b0: 6e64 6f77 0062 6f78 3269 0010 0000 0000 ndow.box2i......
00000c0: 0000 0000 0000 0000 0000 0000 0000 006c ...............l
00000d0: 696e 654f 7264 6572 006c 696e 654f 7264 ineOrder.lineOrd
00000e0: 6572 0001 0000 0000 7069 7865 6c41 7370 er......pixelAsp
00000f0: 6563 7452 6174 696f 0066 6c6f 6174 0004 ectRatio.float..
0000100: 0000 0000 0080 3f73 6372 6565 6e57 696e ......?screenWin
0000110: 646f 7743 656e 7465 7200 7632 6600 0800 dowCenter.v2f...
0000120: 0000 0000 0000 0000 0000 7363 7265 656e ..........screen
0000130: 5769 6e64 6f77 5769 6474 6800 666c 6f61 WindowWidth.floa
0000140: 7400 0400 0000 0000 803f 0053 0100 0000 t........?.S....
0000150: 0000 0000 0000 0008 0000 0000 3c00 3c00 ............<.<.
0000160: 3c00 3c <.<
Black.txt
0000000: 762f 3101 0200 0000 6368 616e 6e65 6c73 v/1.....channels
0000010: 0063 686c 6973 7400 4900 0000 4100 0100 .chlist.I...A...
0000020: 0000 0000 0000 0100 0000 0100 0000 4200 ..............B.
0000030: 0100 0000 0000 0000 0100 0000 0100 0000 ................
0000040: 4700 0100 0000 0000 0000 0100 0000 0100 G...............
0000050: 0000 5200 0100 0000 0000 0000 0100 0000 ..R.............
0000060: 0100 0000 0063 6f6d 7072 6573 7369 6f6e .....compression
0000070: 0063 6f6d 7072 6573 7369 6f6e 0001 0000 .compression....
0000080: 0000 6461 7461 5769 6e64 6f77 0062 6f78 ..dataWindow.box
0000090: 3269 0010 0000 0000 0000 0000 0000 0000 2i..............
00000a0: 0000 0000 0000 0064 6973 706c 6179 5769 .......displayWi
00000b0: 6e64 6f77 0062 6f78 3269 0010 0000 0000 ndow.box2i......
00000c0: 0000 0000 0000 0000 0000 0000 0000 006c ...............l
00000d0: 696e 654f 7264 6572 006c 696e 654f 7264 ineOrder.lineOrd
00000e0: 6572 0001 0000 0000 7069 7865 6c41 7370 er......pixelAsp
00000f0: 6563 7452 6174 696f 0066 6c6f 6174 0004 ectRatio.float..
0000100: 0000 0000 0080 3f73 6372 6565 6e57 696e ......?screenWin
0000110: 646f 7743 656e 7465 7200 7632 6600 0800 dowCenter.v2f...
0000120: 0000 0000 0000 0000 0000 7363 7265 656e ..........screen
0000130: 5769 6e64 6f77 5769 6474 6800 666c 6f61 WindowWidth.floa
0000140: 7400 0400 0000 0000 803f 0053 0100 0000 t........?.S....
0000150: 0000 0000 0000 0008 0000 0000 3c00 0000 ............<...
0000160: 0000 00 ...
Red.txt
0000000: 762f 3101 0200 0000 6368 616e 6e65 6c73 v/1.....channels
0000010: 0063 686c 6973 7400 4900 0000 4100 0100 .chlist.I...A...
0000020: 0000 0000 0000 0100 0000 0100 0000 4200 ..............B.
0000030: 0100 0000 0000 0000 0100 0000 0100 0000 ................
0000040: 4700 0100 0000 0000 0000 0100 0000 0100 G...............
0000050: 0000 5200 0100 0000 0000 0000 0100 0000 ..R.............
0000060: 0100 0000 0063 6f6d 7072 6573 7369 6f6e .....compression
0000070: 0063 6f6d 7072 6573 7369 6f6e 0001 0000 .compression....
0000080: 0000 6461 7461 5769 6e64 6f77 0062 6f78 ..dataWindow.box
0000090: 3269 0010 0000 0000 0000 0000 0000 0000 2i..............
00000a0: 0000 0000 0000 0064 6973 706c 6179 5769 .......displayWi
00000b0: 6e64 6f77 0062 6f78 3269 0010 0000 0000 ndow.box2i......
00000c0: 0000 0000 0000 0000 0000 0000 0000 006c ...............l
00000d0: 696e 654f 7264 6572 006c 696e 654f 7264 ineOrder.lineOrd
00000e0: 6572 0001 0000 0000 7069 7865 6c41 7370 er......pixelAsp
00000f0: 6563 7452 6174 696f 0066 6c6f 6174 0004 ectRatio.float..
0000100: 0000 0000 0080 3f73 6372 6565 6e57 696e ......?screenWin
0000110: 646f 7743 656e 7465 7200 7632 6600 0800 dowCenter.v2f...
0000120: 0000 0000 0000 0000 0000 7363 7265 656e ..........screen
0000130: 5769 6e64 6f77 5769 6474 6800 666c 6f61 WindowWidth.floa
0000140: 7400 0400 0000 0000 803f 0053 0100 0000 t........?.S....
0000150: 0000 0000 0000 0008 0000 0000 3c00 0000 ............<...
0000160: 0000 3c ..<
diff white.txt black.txt
22,23c22,23
< 0000150: 0000 0000 0000 0008 0000 0000 3c00 3c00 ............<.<.
< 0000160: 3c00 3c <.<
---
> 0000150: 0000 0000 0000 0008 0000 0000 3c00 0000 ............<...
> 0000160: 0000 00
The short answer is that this will probably not give you a useful result.
The moderately-long answer is that this approach makes a number of assumptions that are not at all "safe" with regard to image processing.
The primary assumption is that a Low Dynamic Range value of 255 represents an HDR value of 65535. The primary problem that HDR intends to solve is that real-world signals have to be compressed to a limited scope. Imagine taking a digital photograph of the sun directly: the input value for that light intensity is much greater than any imaging software supports, so it has to be compressed somehow. With LDR, the center of the sun's disk and much of the bloom around it will all be clamped to 255. With HDR, you're still clamping, but only to 65535. If you have a real-world signal which is giving values like 200, 255, 300 and 100,000, and then that gets clamped to 255, it should make sense that you cannot simply scale 255 to 65535 and get a reasonable result. That 255 might have been clamped from 256, or from 300, or from 100000; there's no way to know. (This is a radical oversimplification of imaging, but it should be sufficient for understanding this limitation in particular).
A secondary assumption is that what you see on your monitor has anything to do with the values in your image. The 0 - 65535 range of values in the image must be represented on your display, which is almost certainly limited to the sRGB spectrum (255). Mostly likely, if you've simply scaled 0-255 to 0-65535, then 99% of your range is above 255. So regardless of how much information is in your image, it's easy for it all to get clipped to "white."
Furthermore, depending on how Photoshop (or the GPU driver or the OS or the display panel) is translating your HDR 65535 into sRGB, it's just as likely that it's AGAIN being clamped to 255, or perhaps scaled "dumbly," or perhaps scaled "smartly," or any combination thereof. If Photoshop shows your image as solid white, you'll have to confirm a number of steps in the process to determine "who" in particular is transforming your color values, and how. Photoshop might be clamping before it sends to the OS. The OS might be clamping before it sends to the GPU. The GPU might be clamping when it sends to the display. The display might be clamping when it turns on the pixel. ...or any combination of clamping, scaling, and transforming at any of those steps (I know, not all of those combinations are actually possible, but the point is that there is a lot going on between the file and your eyeball).
Transforming LDR values to an HDR color space (and vice versa) is a non-trivial pursuit that represents a discipline unto itself. Depending on your application, you may need to do a great deal more research before you come to a good solution.
Camtasia Studio is a software package for recording screen captures. One thing it does, it records the mouse movement coordinates separately from the video of your screen. It does this so you can modify the appearance of the cursor after you are done recording.
Once you have recorded your screen, it has an option for exporting the raw components of your capture. One of the files contains the cursor coordinates which look like this...
4556 5453 0300 0000 0c00 0000 0c00 0000
ca00 0000 0c00 0000 0100 0000 0000 0000
8002 0000 e001 0000 1900 0000 cb00 0000
1900 0000 0100 0000 0000 0000 000c 0259
0000 0059 0014 0000 00e0 e8ab 096a 032d
08b8 0100 00c8 0000 0008 0000 0037 0000
00b0 feff ffef 0328 02d2 0100 00f0 0328
02d2 0100 00f1 0329 02e0 0100 00f2 032a
02e0 0100 00f5 032b 02ed 0100 00f8 032d
02ed 0100 00fb 032f 02fa 0100 0001 0432
02fa 0100 0007 0435 0208 0200 000e 043a
0208 0200 0018 043f 0215 0200 0023 0445
0215 0200 002e 044a 0215 0200 0039 0450
0215 0200 0046 0455 0215 0200 004f 0458
0215 0200 0056 045a 022c 0200 005d 045e
022c 0200 0063 0462 0242 0200 0068 0465
0242 0200 006f 046b 0258 0200 0072 046f
0258 0200 0079 0476 0280 0200 0082 047d
0280 0200 0089 0484 028c 0200 0091 048a
028c 0200 0098 0494 029a 0200 009e 049c
029a 0200 00a3 04a0 029a 0200 00a7 04a3
029a 0200 00aa 04a6 02aa 0200 00af 04ab
02bc 0200 00b2 04ae 02bc 0200 00b4 04b3
02bc 0200 00b8 04b7 02cc 0200 00be 04bd
02cc 0200 00c1 04bf 02dd 0200 00c3 04c1
02dd 0200 00c6 04c4 02f8 0200 00c9 04c6
02f8 0200 00cb 04c8 0205 0300 00cc 04c9
0213 0300 00cd 04c9 0213 0300 00cd 04ca
0220 0300 00ce 04cb 0221 0300 00ce 04cc
0221 0300 00ce 04cd 0236 0300 00ce 04ce
0236 0300 00cd 04cf 024d 0300 00cc 04d0
024d 0300 00cc 04d1 0262 0300 00cb 04d2
0262 0300 00cb 04d3 0279 0300 00ca 04d3
02a5 0300 00c9 04d3 0218 0000 0002 0000
000c 0000 0002 0000 0000 0000 0081 0404
0487 06a5 04a5 0300 00f8 0304 0487 06ba
040a 0000 0003 0000 000a 0000 0001 0000
0000 0000 0000 0008 0009 000c 0000 0001
0000 000c 0000 0001 0000 0000 0000 00ff
033b 027f 061b 040c 0000 0005 0000 000c
0000 0001 0000 0000 0000 0000 0000 00ff
ffff ff0c 0000 0004 0000 000c 0000 0001
0000 0000 0000 0001 0000 0000 0000 001c
0000 002d 0100 001c 0000 0001 0000 0090
0300 0000 0100 0079 0000 0044 0000 0000
0000 0000 0000 0000 0000 00
This is from a 1 second recording. The screen capture size was 640x480. I was moving the mouse from the top left corner to the bottom right corner.
So here is my question. Is there a way to translate this information to time and X, Y coordinates of the video? I guess I just don't understand the notation but I want to use this information for my own project. Can anyone make sense of this data?