Loading ...
Sorry, an error occurred while loading the content.

Re[2]: [mod_perl2] ImageMagick 'convert'

Expand Messages
  • Lee Goddard
    Hi Stas, On Friday, April 11, 2003 at 8:25:09 AM, you wrote: ... SB Your case still includes things that I don t have, references to some SB images... can
    Message 1 of 3 , Apr 11 12:18 AM
    • 0 Attachment
      Hi Stas,

      On Friday, April 11, 2003 at 8:25:09 AM, you wrote:

      SB> Lee Goddard wrote:
      >> LG> On Wednesday, April 9, 2003 at 1:34:34 AM, Stas wrote:
      >> SB>> Lee Goddard wrote:
      >>
      >>>>>I'm sure it's to be advised against, but for perverted reasons of my
      >>>>>own I'm trying to use Filter::CBC with mp2. And on Win2k.
      >>>>>
      >>>>>Has anyone done this and actually got it working?
      >>>>>
      >>>>>I've been tweaking a bit, but no joy so far. Things that worked in
      >>>>>mod_perl1 and on the command line croak after a nasty "can't write to
      >>>>>memory" error.
      >>>>>
      >>>>>Or, if you've managed to get the latest ImageMagick/PerlMagick dll
      >>>>>working on the same platform, I'd very much appreciate hearing from
      >>>>>you. Same problem as with Filter::CBC, above.
      >>>>
      >>
      >> SB>> You probably want to check who writes "can't write to
      >> SB>> memory" error (perl or the module) and figure why.
      >>
      >> LG> If only I could.
      >>
      >> SB>> If that fails any chance you can isolate the shortest possible code that I can
      >> SB>> try to reproduce the problem with (I'm on linux, but the problem might be
      >> SB>> similar?)
      >>
      >> LG> Yes, thanks: the attached file should explain how it happens.
      >>
      >> LG> Thanks in anticipation
      >> LG> lee
      >>
      >> Attached is the script more pared down - sorry about that.
      >> It looks like ImageMagick's composite method, but I don't
      >> notice the problem on the command line -- could it still
      >> be IM at fault?

      SB> Your case still includes things that I don't have, references to some
      SB> images... can you trim it down to something that can be used as is? it'd be
      SB> nice to add this test to mp2 test suite. Some heavy apps are good for testing.

      I'm afraid I can't trim it down to exclude the images, as
      this is an image-based test. But any image will do, and I've
      tried to make it easy by putting the paths in obvious variables at the top.

      SB> Also you don't say anything about your perl build specifics, neither you

      Beg pardon: now attached to the end of this mail.

      SB> mention which ImageMagic lib version do you use and which I::M Perl lib you
      SB> have the trouble with. See:
      SB> http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems

      The very latest: 556 Q16, the official Windows distribution. Whilst
      this IM builds fine, I can't get PerlMagick to build (didn't try very
      hard) so can't say if it's okay with Q8. I do know that it's fine with
      Apache/mp 1, but then the problem only seems to be with multiple
      synchronous requests. Debug is not enabled on the official release.

      SB> May be we will have a better luck, with Filter::CBC as it doesn't rely on any
      SB> external libs (I think).

      Filter::CBC is okay with TwoFish, it's the default Rj that messes it
      up.

      Also - in the logs quoted in that previous mail, there's an
      interesting warning about v-string not being portable...?

      Thanks for your help and interest, Stas. If I ever get this thing
      working and earning money, there'll defiantly be donations to the
      foundation.

      Cheers
      lee

      Summary of my perl5 (revision 5 version 8 subversion 0) configuration:
      [Binary pre-built by Randy at theory5]
      Platform:
      osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
      uname=''
      config_args='undef'
      hint=recommended, useposix=true, d_sigaction=undef
      usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define
      useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
      use64bitint=undef use64bitall=undef uselongdouble=undef
      usemymalloc=n, bincompat5005=undef
      Compiler:
      cc='cl', ccflags ='-nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
      optimize='-MD -DNDEBUG -O1',
      cppflags='-DWIN32'
      ccversion='', gccversion='', gccosandvers=''
      intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
      d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
      ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
      alignbytes=8, prototype=define
      Linker and Libraries:
      ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:\PhotoWebServer\Perl\lib\CORE" -machine:x86'
      libpth=\lib
      libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
      perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
      libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
      gnulibc_version='undef'
      Dynamic Linking:
      dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
      cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -libpath:"C:\PhotoWebServer\Perl\lib\CORE" -machine:x86'
    • Stas Bekman
      ... You can always inline image using uuencoded or similar ascii friendly encoding. cat /usr/share/doc/perl-IO-stringy-2.108/icons/itembullet.gif | perl -0777
      Message 2 of 3 , Apr 11 12:57 AM
      • 0 Attachment
        > SB> Your case still includes things that I don't have, references to some
        > SB> images... can you trim it down to something that can be used as is? it'd be
        > SB> nice to add this test to mp2 test suite. Some heavy apps are good for testing.
        >
        > I'm afraid I can't trim it down to exclude the images, as
        > this is an image-based test. But any image will do, and I've
        > tried to make it easy by putting the paths in obvious variables at the top.

        You can always inline image using uuencoded or similar ascii friendly encoding.

        cat /usr/share/doc/perl-IO-stringy-2.108/icons/itembullet.gif | perl -0777 -e
        'print pack("u", <>)' | perl -0777 -e 'print unpack "u", <>' > out.gif

        so you convert the binary image into a uuencoded string:

        $ cat foo.gif | perl -0777 -e 'print pack("u", <>)'
        M1TE&.#=A#P`.`*$``/CX^/C\^*@L4.#DX"P`````#P`.```"'801J7JV'QJ$
        7;KYJ<Q):B=]]8B:6V8"F0\>V+-(6`#L`

        (-0777 is the same as 'local $/' to slurp the whole thing in)


        Now you inline this uuencoded string into a variable in your test and convert
        it to the binary format at run time:

        ...
        $uuencoded = <<EOUU;
        M1TE&.#=A#P`.`*$``/CX^/C\^*@L4.#DX"P`````#P`.```"'801J7JV'QJ$
        7;KYJ<Q):B=]]8B:6V8"F0\>V+-(6`#L`
        EOUU
        $binary = unpack("u", $uuencoded);

        then you can send this image as if it was a file on the disk.


        > SB> Also you don't say anything about your perl build specifics, neither you
        >
        > Beg pardon: now attached to the end of this mail.

        perl -V is not enough, I ask people to follow the guidelines for a reason :)
        http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems

        also the next version of mp2 will sport mp2bug script (it's in cvs already).

        > SB> mention which ImageMagic lib version do you use and which I::M Perl lib you
        > SB> have the trouble with. See:
        > SB> http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
        >
        > The very latest: 556 Q16, the official Windows distribution. Whilst
        > this IM builds fine, I can't get PerlMagick to build (didn't try very
        > hard) so can't say if it's okay with Q8. I do know that it's fine with
        > Apache/mp 1, but then the problem only seems to be with multiple
        > synchronous requests. Debug is not enabled on the official release.

        Dunno if I get to build it. May be tomorrow. Meanwhile a self-containing test
        would be cool.

        > SB> May be we will have a better luck, with Filter::CBC as it doesn't rely on any
        > SB> external libs (I think).
        >
        > Filter::CBC is okay with TwoFish, it's the default Rj that messes it
        > up.

        Is it hard to write a short test? I haven't used Filter::CBC yet. So I won't
        have to mess with the magic install.

        > Also - in the logs quoted in that previous mail, there's an
        > interesting warning about v-string not being portable...?

        probably complaining about:

        our $VERSION = 0.1;

        does it help to use "0.1"?

        > Thanks for your help and interest, Stas. If I ever get this thing
        > working and earning money, there'll defiantly be donations to the
        > foundation.

        Cool!

        __________________________________________________________________
        Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
        http://stason.org/ mod_perl Guide ---> http://perl.apache.org
        mailto:stas@... http://use.perl.org http://apacheweek.com
        http://modperlbook.org http://apache.org http://ticketmaster.com
      Your message has been successfully submitted and would be delivered to recipients shortly.