~ubuntu-branches/ubuntu/oneiric/evince/oneiric-updates

« back to all changes in this revision

Viewing changes to backend/dvi/mdvi-lib/bitmap.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Josselin Mouette, Marc 'HE' Brockschmidt
  • Date: 2008-12-31 16:41:58 UTC
  • mfrom: (1.1.36 upstream)
  • mto: (1.5.1 sid)
  • mto: This revision was merged to the branch mainline in revision 109.
  • Revision ID: james.westby@ubuntu.com-20081231164158-xnobl1sokvvc6ho8
Tags: 2.24.2-1
[ Josselin Mouette ]
* README.Debian: document that you need to install poppler-data.
  Closes: #506836.

[ Marc 'HE' Brockschmidt ]
* debian/control: Make the Gnome team maintainer. I'm not doing the job
   anyway.

[ Josselin Mouette ]
* New upstream release.
* Require nautilus 2.22 to build the extension for the correct 
  version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
 * hopelessly slow.
126
126
 */
127
127
 
128
 
BITMAP  *bitmap_convert_lsb8(Uchar *bits, int w, int h)
 
128
BITMAP  *bitmap_convert_lsb8(Uchar *bits, int w, int h, int stride)
129
129
{
130
130
        BITMAP  *bm;
131
131
        int     i;
147
147
        for(i = 0; i < h; i++) {
148
148
#ifdef WORD_LITTLE_ENDIAN
149
149
                memcpy(unit, curr, bytes);
150
 
                curr += bytes;
 
150
                curr += stride;
151
151
#else
152
152
                int     j;
153
153
                
154
154
                for(j = 0; j < bytes; curr++, j++)
155
155
                        unit[j] = bit_swap[*curr];
 
156
                cur += stride - bytes;
156
157
#endif
157
158
                memzero(unit + bytes, bm->stride - bytes);
158
159
                unit  += bm->stride;
162
163
        return bm;
163
164
}
164
165
 
165
 
BITMAP  *bitmap_convert_msb8(Uchar *data, int w, int h)
 
166
BITMAP  *bitmap_convert_msb8(Uchar *data, int w, int h, int stride)
166
167
{
167
168
        BITMAP  *bm;
168
169
        Uchar   *unit;
180
181
                
181
182
                for(j = 0; j < bytes; curr++, j++)
182
183
                        unit[j] = bit_swap[*curr];
 
184
                curr += stride - bytes;
183
185
#else
184
186
                memcpy(unit, curr, bytes);
185
 
                curr += bytes;
 
187
                curr += stride;
186
188
#endif
187
189
                memzero(unit + bytes, bm->stride - bytes);
188
190
                unit += bm->stride;