Here is my kluge to accommodate the header my .jpgs have:

isJpeg0_jjpeg_=: 4 : 0
   *./ +./x +./ . = 0 1 2 3 6 7 8 9 10 { a.&i.^:(2=3!:0) 11{.y
)
isJpeg_jjpeg_=: (255 216 255 224 74 70 73 70 0,:255 216 255 225 69 120 105
102 0)&isJpeg0_jjpeg_

The imagemagick idea is no good - I'm dealing w/hundreds of files per day
and have a nice J process that was working well w/.jpgs until the attempt
to move to J8 broke it.  I may have to go back to the old, unsupported
methods.


On Sun, Apr 19, 2015 at 6:38 PM, bill lam <[email protected]> wrote:

> Please provide details how it failed to detect a vaild jpeg file, eg which
> 9 bytes it read and what should be the 11 bytes.
>
> jpeg addon should automatically use Qt if available. Otherwise it use pure
> J scripts.
>
> You could also use platimg or image3 addons of J602, however they are no
> longer maintained.
> On Apr 20, 2015 3:26 AM, "Devon McCormick" <[email protected]> wrote:
>
> > All -
> >
> > I find my efforts to move fully onto J8 stymied by the inadequate support
> > for .JPG image files in the  jpeg addon.  When I attempt to read a valid
> > file that can be read properly by at least 2 other applications, I get
> the
> > error "invalid JPEG file".  The proximate cause of this error is a zero
> > returned by "isJpeg" which is checking for 9 of the first 11 bytes of my
> > file to have specific values.
> >
> > I can kluge this to accept the headers of the files it's currently
> > rejecting but, in any case, this version of "readjpeg" is excruciatingly
> > slow: it takes about 30 seconds to read in a file that's well under 300K.
> >
> > Does anyone have any ideas for alternatives to the existing J8 jpeg
> > reader?  I'd prefer not to continue to use the old J7 gtk-based ones but
> > see no other way for now.
> >
> > Thanks,
> >
> > Devon
> >
> > --
> > Devon McCormick, CFA
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to