Skip to main content
Participating Frequently
May 20, 2011
Question

Convert tif/tiff files

  • May 20, 2011
  • 3 replies
  • 2899 views

Afternoon,

Does anyone knows if it´s possible to convert tif/tiff files using CF or Railo ?

I´ve already tried using cfimage and renaming the file using cfifle action='rename' but did not succeed

Anyone ?

Thanks in advance

    This topic has been closed for replies.

    3 replies

    BKBK
    Community Expert
    Community Expert
    May 25, 2011

    You could use the code


    <cfimage source="C:\Documents and Settings\Mesecrepathy\Desktop\foto.TIF" name="mySourceImg">
    <cfimage action="convert" source="#mySourceImg#" destination="C:\Documents and Settings\Mesecrepathy\Desktop\myImg1.png">
    done converting


    or else

    <cfimage source="C:\Documents and Settings\Mesecrepathy\Desktop\foto.TIF" name="mySourceImg">
    <cfimage action="write" source="#mySourceImg#" destination="C:\Documents and Settings\Mesecrepathy\Desktop\myImg2.png">
    done converting

    Inspiring
    May 25, 2011

    Neither of those options works with Railo.  As far as I can tell Railo doesn't support TIFFs with CFIMAGE.

    Neither OpenBD not BD.NET support TIFFs either.  They offer a better error message though (it states that TIFFs aren't supported).

    --

    Adam

    Participating Frequently
    May 25, 2011

    At this point it's probably best moved over to the Railo forums, don't ya think?

    BKBK
    Community Expert
    Community Expert
    May 24, 2011

    The following code works for me:

    <cfimage action="convert" source="C:\Documents and Settings\bkbk\Desktop\testImage.TIF" destination="C:\Documents and Settings\bkbk\Desktop\testImg.png">
    done converting

    Inspiring
    May 24, 2011

    Yep, Ricardo sent me one of his TIFs and it converts fine with CF8 & CF9.  But it failed on Railo.  So it's a Railo problem.

    --

    Adam

    Inspiring
    May 24, 2011
    Does anyone knows if it´s possible to convert tif/tiff files using CF or Railo ?

    Convert them to what format...?

    I´ve already tried using cfimage and renaming the file using cfifle action='rename' but did not succeed

    Forget about renaming because that will not change the file's format, only its name.

    As far as cfimage, what code did you use and what do you mean by "did not succeed"?

    riconradoAuthor
    Participating Frequently
    May 24, 2011

    I need to convert them to any image file (png,jpg,...) apart from tif/tiff. Eventually i have to attach them on an email and i think it´s easier.

    I was trying to use <cfimage> with the attribute (action="convert") but i don´t think that works with that kind of image file.

    did not succeed = didn´t work

    Thank´s for helping

    Inspiring
    May 24, 2011

    Right.  Two things:

    1) where's your code;

    2) When someone asks what you mean by "did not suceed", they arenot asking you to simply repeat yourself like this:

    did not succeed = didn´t work

    What they are asking is "what did it do instead of meet your expectations?"  eg: did it error?  Was the resultant image scrambled?  Did apparently *nothing* happen?

    --

    Adam