[gs-bugs] [Bug 691868] New: DCTEncode filter crashes Ghostscript if QuantTables parameter specified

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Wed Jan 5 23:26:15 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=691868

           Summary: DCTEncode filter crashes Ghostscript if QuantTables
                    parameter specified
           Product: Ghostscript
           Version: 8.71
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P4
         Component: Images
        AssignedTo: alex.cherepanov at artifex.com
        ReportedBy: ptribick at hotmail.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0


When using the DCTEncode filter, Ghostscript crashes if the QuantTables
parameter is specified. Adobe Distiller 6.0 is happy with the code.

If QuantTables parameter is removed (ie using default tables), Ghostscript is
happy.

%--

Edited code example (incomplete):

/DataSource { ... } def % provides one row of image data,
                        % ie SamplesPerPixel * ImageWidth bytes

/QTable1    
<0302020302020303030304030304050805050404050A070706080C0A0C0C0B0A0B0B0D0E12100D0E110E0B0B1016101113141515150C0F171816141812141514>
def
/QTable2   
<03040405040509050509140D0B0D1414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414>
def

/SamplesPerPixel 3 def  % Or 1 for B&W

(DCTEncode_temp.jpg) (w) file
<<    /Columns    ImageWidth
    /Rows        ImageHeight
    /Colors        SamplesPerPixel
    /QFactor    1.0
    /QuantTables    [ QTable1 SamplesPerPixel 1 sub { QTable2 } repeat ]
>> /DCTEncode filter
ImageHeight { dup DataSource writestring } repeat
closefile
% ...

%--

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list