align 64
  proc  ImgRGB2Flt3
        mov  edx,img+54
        mov  esi,[img+22]       ;y

        movss  xmm0,dword [img+18]
        movss  dword [image.cols],xmm0
        mov    [image.rows],esi

        mov  ebx,imgF3
        mov  eax,0.0039215686275     ;0.0039215686275
        movd xmm0,eax

.0:     mov  ecx,[img+18]        ;x
        test ecx,ecx
        jz   .en
.1:
   rept 3 {     movzx eax,byte [edx]
        cvtsi2ss xmm1,eax
        mulss xmm1,xmm0
        movss [ebx],xmm1
        add   ebx,4
        inc   edx
        }
        dec   ecx
        jnz   .1
        dec   esi
        jnz   .0
.en:    ret
        image.cols dd 0
        image.rows dd 0
  endp
