New winetricks 20080226: adds dotnet11 verb

bill lam cbill.lam at gmail.com
Fri Feb 29 08:58:20 CST 2008


Lei Zhang wrote:
> Can you file a bug on bugzilla and provide a sample image / test code
> to demonstrate this problem?
> 

Done.

Test code is as follows, beware of line wrap.

NB. tested on J602 beta / wine 0.9.56
NB. script to demostrate bug in GdipGetImageWidth GdipGetImageHeight
NB. =========================================================
require 'dll'

s=. 'Ok GenericError InvalidParameter OutOfMemory ObjectBusy InsufficientBuffer '
s=. s,'NotImplemented Win32Error WrongState Aborted FileNotFound ValueOverflow '
s=. s,'AccessDenied UnknownImageFormat FontFamilyNotFound FontStyleNotFound '
s=. s,'NotTrueTypeFont UnsupportedGdiplusVersion GdiplusNotInitialized '
s=. ;:s,'PropertyNotFound PropertyNotSupported ProfileNotFound'

assi=: {::&s assert 0=]

cdi=: (&cd)(assi@)

PixelFormat32bppARGB=: 16b26200a

GdiplusStartup           =: 'gdiplus GdiplusStartup            > i   *i *i i 
      ' &cd
GdiplusShutdown          =: 'gdiplus GdiplusShutdown           > n   i 
      ' &cd

GdipCreateBitmapFromFile =: 'gdiplus GdipCreateBitmapFromFile  > i   *w *i 
      ' cdi
GdipDisposeImage         =: 'gdiplus GdipDisposeImage          > i   i 
      ' cdi

GdipBitmapLockBits       =: 'gdiplus GdipBitmapLockBits        > i   i *i i i *i 
      ' &cd
GdipBitmapUnLockBits     =: 'gdiplus GdipBitmapUnlockBits      > i   i *i 
      ' cdi

GdipGetImageWidth        =: 'gdiplus GdipGetImageWidth         >  i    i  *i 
       ' &cd
GdipGetImageHeight       =: 'gdiplus GdipGetImageHeight        >  i    i  *i 
       ' &cd

ImageLockModeRead=: 1
GUID=: 'WWWWXXYYZZZZZZZZ'
BitmapData=: 'WdthHghtStrdFrmtScanRsrv'
GdiplusStartupInput=: 1 0 0 0

readimg1=: 3 : 0
DATA=. i.4%~#BitmapData
assi GdiplusStartup (TOK=. ,_1);GdiplusStartupInput;0
assi GdipCreateBitmapFromFile y;(BMP=. ,_1)
assi GdipGetImageWidth ({.BMP);(Width=. ,_1)
assi GdipGetImageHeight ({.BMP);(Height=. ,_1)
1!:2&2 'GdipGetImageWidth GdipGetImageHeight ', ": Width,Height
rt=. 0 0, Width, Height
assi GdipBitmapLockBits ({.BMP);rt;ImageLockModeRead;PixelFormat32bppARGB;DATA
'w h s f p r'=. DATA
1!:2&2 'width height stride format scan0 res ', ":DATA
z=. |.^:(s<0) w&{."1^:(w~:|s%4) (h,|s%4)$memr p,((s<0)*s*<:h),(h*<.|s%4),JINT
GdipBitmapUnLockBits ({.BMP);DATA
GdipDisposeImage {.BMP
GdiplusShutdown {.TOK
''
)
NB. =========================================================


NB. run the script
readimg1 'z:/tmp/2083.jpg'





More information about the wine-devel mailing list