blur regions on a image

Help
2012-09-04
2012-10-06
  • Markus Barth

    Markus Barth - 2012-09-04

    Hello,

    I've a little problem here to solve. I'm using iipsrv for a project. It is a
    cool thing. For my project I need to blur some regions on the image before
    delivering it.

    Could anyone tell my what the best solution for debugging the iipsrv is. I've
    never had debugged c++ programs. I#m using Ubuntu and Eclipse.

    Thank you very much.

     
  • Ruven

    Ruven - 2012-09-04

    The best way to debug is to run iipsrv from the command line rather than have
    Apache or Lighttpd start it. Then run directly via your debugger with the
    --bind argument.

    You will then need to configure Apache or whatever web server to forward fcgi
    requests to the appropriate port. See the command line section of the documen
    tation

    for details on how to do this.

     
  • Markus Barth

    Markus Barth - 2012-09-04

    Ok -Thank you for the quick answer. I only partly get it.

    "Then run directly via your debugger with the --bind argument." could you tell
    me how to do this. i think I could manage the rest.

    Thanks again.

     
  • Markus Barth

    Markus Barth - 2012-09-04

    No - I dont get it - sorry

    I'm using Apache and have this in the iipsrv.conf

    ScriptAlias /fcgi-bin/ "/usr/lib/cgi-bin/"
    
    # Set the options on that directory
    <Directory "/fcgi-bin/">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    
    # Set the handler
    AddHandler fastcgi-script fcg fcgi fpl
    
    # Initialise the FCGI server - set some default values
    FastCgiServer /usr/lib/cgi-bin/iipsrv.fcgi \
    -initial-env LOGFILE=/var/log/iipsrv.log \
    -initial-env VERBOSITY=1 \
    -initial-env JPEG_QUALITY=90 \
    -initial-env MAX_IMAGE_CACHE_SIZE=10 \
    -initial-env MAX_CVT=5000 \
    -initial-env MEMCACHED_SERVERS=localhost
    

    I've downloaded the iipsrv src and compiled it. I've also tried to build it in
    eclipse => no success

    But with the normal build, i can start the iipsrv.

    If I try this

    iipsrv.fcgi --bind 192.168.5.40:9000
    bind/listen: Address already in use
    

    I think the other server is allready running on port 9000
    so I try this

    iipsrv.fcgi --bind 192.168.5.40:9012
    

    and the server is running - I think

    But there is no responce on 192.168.5.40:9012 - so I think I have to tell
    apache something

    I don't know how to config apache the same as in you sample for lighttpd

    I don't know howto attach a debugger

    Thank you and sorry for being a slow coach

     
  • Ruven

    Ruven - 2012-09-04

    You have asked Apache to start it's own version of iipsrv. You need to ask it
    instead to redirect requests to your own process. See the mod_fastcgi
    documentation for how to do this or use the configuration given in the
    IIPImage documentation for Lighttpd.

    Well, if you've never debugged C++ and don't know to attach a debugger, you
    should perhaps start with something easier than iipsrv first, then try again
    when you've got the hang of it as servers are not the easiest things to debug.

     
  • Markus Barth

    Markus Barth - 2012-09-04

    Off course you are right - I think I will handle it.

    But maybe you can help me on this.

    I need to mak a region on an image not visible. Maybe only white pixles on
    that region or maybe ther is a blur function. Where woudl be the best part to
    manipulate the image.

    I've found 3 functions that are opening a tiff image.

    openImage
    loadImageInfo
    getTile

    Can I draw something on that image?

    Maybe I could use the watermark functionality. Can I draw the watermark only
    on a specific region.

    Thank you

     
  • Ruven

    Ruven - 2012-09-05

    The getTile function gets the image pixel data from the TIFF, so you can
    either do stuff directly there. Or better, go to JTL.cc and do it to the pixel
    buffer there if you want to do this per tile. Or CVT.cc if you want to apply
    this to an image export. The data buffers are just raw sequential pixel
    values. Even better would be to add a function to Transforms.cc (if you are
    using the SVN code) to do blurring and hook this function into the CVT.cc or
    JTL.cc to apply it.

     

Anonymous
Anonymous

Cancel  Add attachments