View | Details | Raw Unified | Return to bug 6679
Collapse All | Expand All

(-)a/C4/Creators/PDF.pm (-7 / +6 lines)
Lines 168-174 sub prAltJpeg Link Here
168
{  my ($iData, $iWidth, $iHeight, $iFormat,$aiData, $aiWidth, $aiHeight, $aiFormat) = @_;
168
{  my ($iData, $iWidth, $iHeight, $iFormat,$aiData, $aiWidth, $aiHeight, $aiFormat) = @_;
169
   my ($namnet, $utrad);
169
   my ($namnet, $utrad);
170
   if (! $PDF::Reuse::pos)                    # If no output is active, it is no use to continue
170
   if (! $PDF::Reuse::pos)                    # If no output is active, it is no use to continue
171
   {   return undef;
171
   {   return;
172
   }
172
   }
173
   prJpegBlob($aiData, $aiWidth, $aiHeight, $aiFormat);
173
   prJpegBlob($aiData, $aiWidth, $aiHeight, $aiFormat);
174
   my $altObjNr = $PDF::Reuse::objNr;
174
   my $altObjNr = $PDF::Reuse::objNr;
Lines 198-204 sub prJpegBlob Link Here
198
{  my ($iData, $iWidth, $iHeight, $iFormat, $altArrayObjNr) = @_;
198
{  my ($iData, $iWidth, $iHeight, $iFormat, $altArrayObjNr) = @_;
199
   my ($iLangd, $namnet, $utrad);
199
   my ($iLangd, $namnet, $utrad);
200
   if (! $PDF::Reuse::pos)                    # If no output is active, it is no use to continue
200
   if (! $PDF::Reuse::pos)                    # If no output is active, it is no use to continue
201
   {   return undef;
201
   {   return;
202
   }
202
   }
203
   my $checkidOld = $PDF::Reuse::checkId;
203
   my $checkidOld = $PDF::Reuse::checkId;
204
   if (!$iFormat)
204
   if (!$iFormat)
Lines 209-224 sub prJpegBlob Link Here
209
          $namnet = 'Ig' . $PDF::Reuse::imageNr;
209
          $namnet = 'Ig' . $PDF::Reuse::imageNr;
210
          $PDF::Reuse::objNr++;
210
          $PDF::Reuse::objNr++;
211
          $PDF::Reuse::objekt[$PDF::Reuse::objNr] = $PDF::Reuse::pos;
211
          $PDF::Reuse::objekt[$PDF::Reuse::objNr] = $PDF::Reuse::pos;
212
          open (BILDFIL, "<$iFile") || errLog("Couldn't open $iFile, $!, aborts");
212
          open (my $fh, '<', "$iFile") || errLog("Couldn't open $iFile, $!, aborts");
213
          binmode BILDFIL;
213
          binmode $fh;
214
          my $iStream;
214
          my $iStream;
215
          sysread BILDFIL, $iStream, $iLangd;
215
          sysread $fh, $iStream, $iLangd;
216
          $utrad = "$PDF::Reuse::objNr 0 obj\n<</Type/XObject/Subtype/Image/Name/$namnet" .
216
          $utrad = "$PDF::Reuse::objNr 0 obj\n<</Type/XObject/Subtype/Image/Name/$namnet" .
217
                    "/Width $iWidth /Height $iHeight /BitsPerComponent 8 " .
217
                    "/Width $iWidth /Height $iHeight /BitsPerComponent 8 " .
218
                    ($altArrayObjNr ? "/Alternates $altArrayObjNr 0 R " : "") .
218
                    ($altArrayObjNr ? "/Alternates $altArrayObjNr 0 R " : "") .
219
                    "/Filter/DCTDecode/ColorSpace/DeviceRGB"
219
                    "/Filter/DCTDecode/ColorSpace/DeviceRGB"
220
                    . "/Length $iLangd >>stream\n$iStream\nendstream\nendobj\n";
220
                    . "/Length $iLangd >>stream\n$iStream\nendstream\nendobj\n";
221
          close BILDFIL;
221
          close $fh;
222
          $PDF::Reuse::pos += syswrite $PDF::Reuse::UTFIL, $utrad;
222
          $PDF::Reuse::pos += syswrite $PDF::Reuse::UTFIL, $utrad;
223
          if ($PDF::Reuse::runfil)
223
          if ($PDF::Reuse::runfil)
224
          {  $PDF::Reuse::log .= "Cid~$PDF::Reuse::checkId\n";
224
          {  $PDF::Reuse::log .= "Cid~$PDF::Reuse::checkId\n";
225
- 

Return to bug 6679