[Aqsis-commits] SF.net SVN: aqsis:[2378] trunk/testing/regression
Brought to you by:
ltatkinson,
pgregory
From: <c4...@us...> - 2008-08-17 12:55:36
|
Revision: 2378 http://aqsis.svn.sourceforge.net/aqsis/?rev=2378&view=rev Author: c42f Date: 2008-08-17 12:55:45 +0000 (Sun, 17 Aug 2008) Log Message: ----------- Add test case for 2-channel greyscale+alpha TIFF bug as fixed in revision 2376 Revision Links: -------------- http://aqsis.svn.sourceforge.net/aqsis/?rev=2376&view=rev Modified Paths: -------------- trunk/testing/regression/RIBs/Texturing/jobs.cfg Added Paths: ----------- trunk/testing/regression/RIBs/Texturing/grayscale_alpha.sl trunk/testing/regression/RIBs/Texturing/grayscale_alpha_bug.rib trunk/testing/regression/reference/grayscale_alpha_bug.tif Added: trunk/testing/regression/RIBs/Texturing/grayscale_alpha.sl =================================================================== --- trunk/testing/regression/RIBs/Texturing/grayscale_alpha.sl (rev 0) +++ trunk/testing/regression/RIBs/Texturing/grayscale_alpha.sl 2008-08-17 12:55:45 UTC (rev 2378) @@ -0,0 +1,19 @@ +/** Imager shader which samples a two channel grayscale+alpha texture, and + * simply reproduces it in the output image. + */ +imager grayscale_alpha( + string texturename = "") +{ + float resolution[3]; + float x = 0; + float y = 0; + + if (option("Format", resolution) == 1.0) + { + x = xcomp(P)/ resolution[0]; + y = ycomp(P)/ resolution[1]; + } + + Ci = float texture(texturename[0], x, y, "width", 0); + Oi = float texture(texturename[1], x, y, "width", 0); +} Added: trunk/testing/regression/RIBs/Texturing/grayscale_alpha_bug.rib =================================================================== --- trunk/testing/regression/RIBs/Texturing/grayscale_alpha_bug.rib (rev 0) +++ trunk/testing/regression/RIBs/Texturing/grayscale_alpha_bug.rib 2008-08-17 12:55:45 UTC (rev 2378) @@ -0,0 +1,19 @@ +version 3.03 + +Option "searchpath" "shader" ["../../shaders:&"] +Display "grayscale_alpha_bug.tif" "file" "rgba" "string compression" "lzw" + +Format 200 200 1 +PixelSamples 1 1 +ShadingRate 1 + +MakeTexture "grayscale_alpha.tif" "grayscale_alpha.tx" "black" "black" "box" 1.0 1.0 "string compression" "lzw" +Imager "grayscale_alpha" "texturename" "grayscale_alpha.tx" + +Projection "perspective" "fov" 45 +Rotate -40 1 0 0 +Translate 0 -4 5 + +WorldBegin +WorldEnd + Modified: trunk/testing/regression/RIBs/Texturing/jobs.cfg =================================================================== --- trunk/testing/regression/RIBs/Texturing/jobs.cfg 2008-08-17 12:51:31 UTC (rev 2377) +++ trunk/testing/regression/RIBs/Texturing/jobs.cfg 2008-08-17 12:55:45 UTC (rev 2378) @@ -182,6 +182,24 @@ </p> """) +RenderJob("", "grayscale_alpha_bug.rib", shaders=["grayscale_alpha.sl"], + description=""" + <b>Bug: aqsistex segfaults when opening 2-channel greyscale TIFFs</b> + <p> + A naive reading of the TIFF6 spec. suggests that TIFF files with + PHOTOMETRIC_MINISBLACK will always have a single channel per pixel; the + function CqTiffDirHandle::guessChannels() previously assumed this was the + case. However, it makes perfect sense to store an alpha channel along with + greyscale data for a total of two channels and the GIMP certainly does this. + This led to aqsistex underestimating the required buffer size and segfaulting + when loading two-channel images. + </p> + <p> + The test case uses an imager shader to reproduce a grayscale tiff file; the + image should render without problems and the outer part should be transparent. + </p> + """) + RenderJob("", "tex_tile_wrapping_bug.rib", shaders=["centred_image.sl"], description=""" <b>Bug: Texture wrapping incorrect when texture isn't multiple of tile size</b> Property changes on: trunk/testing/regression/reference/grayscale_alpha_bug.tif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |