New winetricks 20080226: adds dotnet11 verb

bill lam cbill.lam at gmail.com
Wed Feb 27 10:48:32 CST 2008


Dan Kegel wrote:
> What app is this, and what is it about Wine's gdiplus that
> makes you need to override it?  Does the app crash,
> or does it just look bad?  If it crashes, what's the crash log?
> 

The app is a package called 'platimg' of J language.

I had reported this and I believed that it is the negative stride that caused 
the problem.

NB. load and decode a jpeg file into 2D integer matrix with each integer
NB. for one pixel element.
readimg1 'picture.jpg'

where definition of readimg1 is as follows

readimg1=: 3 : 0
   GdiplusStartup (TOK=.,_1);GdiplusStartupInput;0
   GdipCreateBitmapFromFile y;BMP=.,_1
   z=. bmpARGB {.BMP
   GdiplusShutdown {.TOK
   z
)

bmpARGB=: 3 : 0
   DATA=. i.4%~#BitmapData
   GdipBitmapLockBits y;0;ImageLockModeRead;PixelFormat32bppARGB;DATA
   'w h s f p r'=. DATA
   z=. (h,w)$memr p,0,(w*h),JINT
   GdipBitmapUnLockBits y;DATA
   GdipDisposeImage y
   z
)

Here GdipBitmapLockBits has 2 issues,

1. GdipBitmapLockBits accept a null for rect (the second argument) to stands for 
the entire region. I can workaround this by calling GdipGetImageWidth and 
GdipGetImageHeight to construct the rect. However

2. the data returned GdipBitmapLockBits does not point a valid bitmap data, so 
the when trying memory read in the following
z=. (h,w)$memr p,0,(w*h),JINT
J gives raise a domain error. (but no crash, so that no crash log)

Scripts of J can be difficult to understand, but since this example calls 
gdiplus api so that you can follow it without much difficulty and write an 
equivalent c program to test it.

current version of J can be downloaded here.
http://www.jsoftware.com/beta.htm
after installation, run package manager that comes with J to install the platimg 
addon.

regards,




More information about the wine-devel mailing list