Try something like this (beware of line wrapping)

EncoderQuality=: (1&(3!:4) (16b1d5b,~ 16be4b5), 16bfa4a 16b452d), a.{~
16b9c 16bdd 16b5d 16bb3 16b51 16b05 16be7 16beb

'y quality'=. 2{.(boxopen y), <75
NB. TODO adcntr not used because memory leak if error
qual=. 'qual', ": 1 [ adcntr=: >:adcntr
(qual)=: <.quality
parm=. (2&(3!:4) 1), EncoderQuality, 2&(3!:4) 1 4, symdat@symget <qual
...
...
GdipSaveImageToFile ({.BMP);(uucp y);ENC;parm

where GdipSaveImageToFile is the prototype that I posted in previous
emails, the one from platimg does not work for 64-bit.

Птн, 20 Янв 2012, Cliff Reiter писал(а):
> I've made nice progress toward basic image i/o using gdi plus based on 
> snipping lots from the platimg and gl2 addons and beating my head on the 
> wall. My script now works with basic i/o on J6win and j6win64. I expect 
> it will only require a few flip_rbg's to work in J7. While following 
> platimg I can set the jpeg quality in 32 bit J, I have not been able to 
> do the same in 64 bit (only getting default quality). In platimg we see
> 
> bfh=. a. {~ 0 ". '16b' (,"1) _2 ]\ ]
> 
> EncoderQuality=: _2(3!:4)bfh'b5e45b1d4afa2d459cdd5db35105e7eb'
> 
> which is used in
> params=: 3 : 0
>    p=. <<0
>    infos=. getinfos''
>    fmt=. (4{"1 infos) >@{~ y typendx tolower&.> 3{"1 infos
>    if. (0<#QUALITY) *. 'image/jpeg'-: fmt do.
>      p=. 1,EncoderQuality,1,EncoderParameterValueTypeLong,symdat 
> symget<'QUALITY'
>    end.
>    p
> )
> 
> The last entry in p is a pointer the the Jpeg_quality. I like mysteries, 
> but can anyone explain
> b5e45b1d4afa2d459cdd5db35105e7eb
> to me?
> 
> Best, Cliff
> 
> 
> However,
> 
> -- 
> Clifford A. Reiter
> Lafayette College, Easton, PA 18042
> http://webbox.lafayette.edu/~reiterc/
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to