Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcupsimage can't handle sun-raster format (ras_depth == 1 or ras_depth == 24) properly #2107

Closed
michaelrsweet opened this issue Nov 17, 2006 · 2 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2.4
CUPS.org User: sho-otani

When printing sun-raster format (ras_depth == 1 or ras_depth == 24) image, printing image is all black.
I attached patch to fix this.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"cupsimage-sun-bug.patch":

--- image-sun.c.org 2006-11-17 16:06:45.000000000 +0900
+++ image-sun.c 2006-11-17 16:08:39.000000000 +0900
@@ -171,7 +171,7 @@

for (y = 0; y < img->ysize; y ++)
{

  • if (ras_depth != 8 || ras_maplength > 0)
  • if ((ras_depth != 8 && ras_depth != 24) || ras_maplength > 0)
    p = scanline;
    else
    p = in;
    @@ -221,12 +221,12 @@
    *p = 0;

if (bit > 1)

  •      bit >>= 1;
    
  • else
    {
    bit = 128;
    scanptr ++;
    }

  • else

  •      bit >>= 1;
    

    }
    }
    else if (ras_depth == 1)
    @@ -253,12 +253,12 @@
    }

    if (bit > 1)

  •      bit >>= 1;
    
  • else
    {
    bit = 128;
    scanptr ++;
    }

  • else

  •      bit >>= 1;
    

    }
    }
    else if (ras_depth == 8 && ras_maplength > 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant