--- bill lam <[EMAIL PROTECTED]> wrote: > I tried again with the Scripts/Picture Database demo. > To read the jpg and it decoded into an integer array of shape 2848 4288, > 7!:5 <'recdat' > 67108864 > 3!:0 recdat > 4 > $ recdat > 2848 4288 > > */4 2848 4288 > 48848896 > > I appears that this ARGB array is not "wrong" size, and requires less memory > to > represent the picture. I'm able to display the picture with memory limit of > 2^26 > (about 67MB). > > Does your equation Y = C*X + B work for pixels encoded as ARGB integers? > Does > the platimg dll already provide this operation, or it still needs > decomposition > into 3 channels as that in image3?
Any color space transforms require to apply them component-wise, otherwise in ARGB format they will cause overflow to neighboring components. However, the ARGB format allows to apply the transforms over components one-at-a-time, without occupying x3 times space for all three components: get/apply/set. platimg provides only image IO, no operations. The idea is to leave it to the user to make it more interesting and conscious. > Oleg Kobchenko wrote: > > A simple color space transformation could > > be done by J expressions. For example, > > color/brightness could be as simple as > > > > Y = C*X + B > > > > where C is contracts and B is brightness. > > > > Earlier it was discussed that it would be > > good to optimize integral valued division > > > > <[EMAIL PROTECTED] > > > > But it also makes sense to optimize integral > > valued multiplication > > > > <[EMAIL PROTECTED] > > > > or even maybe integral valued polynomial > > > > <[EMAIL PROTECTED] > > > > For the above example it would be > > > > Y = C*X + B > > > > Y = (B,C) <[EMAIL PROTECTED] X > > > > > > --- bill lam <[EMAIL PROTECTED]> wrote: > > > >> I'll try tomorrow. > >> > >> Actually I need some image processing function (eg. lightening) in image3. > >> My > >> original post is not well written because the large space overhead is not > >> directly related to image3, but rather to J interpreter itself. > >> > >> Oleg Kobchenko wrote: > >>> --- bill lam <[EMAIL PROTECTED]> wrote: > >>> > >>>> When I use image3 addon to read a large jpeg, it raise a memory limit > >>>> error, (I > >>>> lower the memory limit to avoid swap). So I use 7!:5 to measure the > >>>> space in > >>>> bytes used by the named objects, > >>>> > >>>> B=: 100 200 3$2 > >>>> 7!:5 <'B' > >>>> 262144 > >>>> */4 100 200 3 > >>>> 240000 > >>>> B=: 1000 2000 3$2 > >>>> 7!:5 <'B' > >>>> 33554432 > >>>> */4 1000 2000 3 > >>>> 24000000 > >>>> B=: 2848 4288 3$2 > >>>> 7!:5 <'B' > >>>> 268435456 > >>>> */4 2848 4288 3 > >>>> 146546688 > >>>> > >>>> It requires nearly double amount of space for large object. Can this be > >>>> improved? > >>> Could you try for comparison the platimg addon to > >>> see if it can handle the large jpegs that you have. > >>> > >>> Thanks. > > > > > > > > > > ____________________________________________________________________________________ > > Don't pick lemons. > > See all the new 2007 cars at Yahoo! Autos. > > http://autos.yahoo.com/new_cars.html > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > -- > regards, > bill > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
