Bugzilla – Attachment 34512 Details for
Bug 13407
Remove methods which are included in the 0.36 release of PDF::Reuse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13407: Removing depricated code included in PDF::Reuse
Bug-13407-Removing-depricated-code-included-in-PDF.patch (text/plain), 4.61 KB, created by
Mark Tompsett
on 2014-12-18 12:35:28 UTC
(
hide
)
Description:
Bug 13407: Removing depricated code included in PDF::Reuse
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-12-18 12:35:28 UTC
Size:
4.61 KB
patch
obsolete
>From 8a2f1265aa89211804444e8eee3055e64cf8a9be Mon Sep 17 00:00:00 2001 >From: Chris Nighswonger <cnighswonger@foundations.edu> >Date: Tue, 2 Dec 2014 12:08:04 -0500 >Subject: [PATCH] Bug 13407: Removing depricated code included in PDF::Reuse > >http://bugs.koha-community.org/show_bug.cgi?id=13407 >See test plan in comment #3. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Creators/PDF.pm | 92 +----------------------------------------------------- > 1 file changed, 1 insertion(+), 91 deletions(-) > >diff --git a/C4/Creators/PDF.pm b/C4/Creators/PDF.pm >index 738c34f..253c53f 100644 >--- a/C4/Creators/PDF.pm >+++ b/C4/Creators/PDF.pm >@@ -170,97 +170,7 @@ sub AltJpeg { > sub Jpeg { > my $self = shift; > my ($imageData, $width, $height, $imageFormat) = @_; >- return prJpegBlob($imageData, $width, $height, $imageFormat); >-} >- >-# FIXME: This magick foo is an absolute hack until the maintainer of PDF::Reuse releases the next version which will include these features >- >-sub prAltJpeg >-{ my ($iData, $iWidth, $iHeight, $iFormat,$aiData, $aiWidth, $aiHeight, $aiFormat) = @_; >- my ($namnet, $utrad); >- if (! $PDF::Reuse::pos) # If no output is active, it is no use to continue >- { return; >- } >- prJpegBlob($aiData, $aiWidth, $aiHeight, $aiFormat); >- my $altObjNr = $PDF::Reuse::objNr; >- $PDF::Reuse::imageNr++; >- $namnet = 'Ig' . $PDF::Reuse::imageNr; >- $PDF::Reuse::objNr++; >- $PDF::Reuse::objekt[$PDF::Reuse::objNr] = $PDF::Reuse::pos; >- $utrad = "$PDF::Reuse::objNr 0 obj\n" . >- "[ << /Image $altObjNr 0 R\n" . >- "/DefaultForPrinting true\n" . >- ">>\n" . >- "]\n" . >- "endobj\n"; >- $PDF::Reuse::pos += syswrite *PDF::Reuse::UTFIL, $utrad; >- if ($PDF::Reuse::runfil) >- { $PDF::Reuse::log .= "Jpeg~AltImage\n"; >- } >- $PDF::Reuse::objRef{$namnet} = $PDF::Reuse::objNr; >- $namnet = prJpegBlob($iData, $iWidth, $iHeight, $iFormat, $PDF::Reuse::objNr); >- if (! $PDF::Reuse::pos) >- { errLog("No output file, you have to call prFile first"); >- } >- return $namnet; >-} >- >-sub prJpegBlob >-{ my ($iData, $iWidth, $iHeight, $iFormat, $altArrayObjNr) = @_; >- my ($iLangd, $namnet, $utrad); >- if (! $PDF::Reuse::pos) # If no output is active, it is no use to continue >- { return; >- } >- my $checkidOld = $PDF::Reuse::checkId; >- if (!$iFormat) >- { my ($iFile, $checkId) = findGet($iData, $checkidOld); >- if ($iFile) >- { $iLangd = (stat($iFile))[7]; >- $PDF::Reuse::imageNr++; >- $namnet = 'Ig' . $PDF::Reuse::imageNr; >- $PDF::Reuse::objNr++; >- $PDF::Reuse::objekt[$PDF::Reuse::objNr] = $PDF::Reuse::pos; >- open (my $fh, '<', "$iFile") || errLog("Couldn't open $iFile, $!, aborts"); >- binmode $fh; >- my $iStream; >- sysread $fh, $iStream, $iLangd; >- $utrad = "$PDF::Reuse::objNr 0 obj\n<</Type/XObject/Subtype/Image/Name/$namnet" . >- "/Width $iWidth /Height $iHeight /BitsPerComponent 8 " . >- ($altArrayObjNr ? "/Alternates $altArrayObjNr 0 R " : "") . >- "/Filter/DCTDecode/ColorSpace/DeviceRGB" >- . "/Length $iLangd >>stream\n$iStream\nendstream\nendobj\n"; >- close $fh; >- $PDF::Reuse::pos += syswrite $PDF::Reuse::UTFIL, $utrad; >- if ($PDF::Reuse::runfil) >- { $PDF::Reuse::log .= "Cid~$PDF::Reuse::checkId\n"; >- $PDF::Reuse::log .= "Jpeg~$iFile~$iWidth~$iHeight\n"; >- } >- $PDF::Reuse::objRef{$namnet} = $PDF::Reuse::objNr; >- } >- undef $checkId; >- } >- elsif ($iFormat == 1) >- { my $iBlob = $iData; >- $iLangd = length($iBlob); >- $PDF::Reuse::imageNr++; >- $namnet = 'Ig' . $PDF::Reuse::imageNr; >- $PDF::Reuse::objNr++; >- $PDF::Reuse::objekt[$PDF::Reuse::objNr] = $PDF::Reuse::pos; >- $utrad = "$PDF::Reuse::objNr 0 obj\n<</Type/XObject/Subtype/Image/Name/$namnet" . >- "/Width $iWidth /Height $iHeight /BitsPerComponent 8 " . >- ($altArrayObjNr ? "/Alternates $altArrayObjNr 0 R " : "") . >- "/Filter/DCTDecode/ColorSpace/DeviceRGB" >- . "/Length $iLangd >>stream\n$iBlob\nendstream\nendobj\n"; >- $PDF::Reuse::pos += syswrite *PDF::Reuse::UTFIL, $utrad; >- if ($PDF::Reuse::runfil) >- { $PDF::Reuse::log .= "Jpeg~Blob~$iWidth~$iHeight\n"; >- } >- $PDF::Reuse::objRef{$namnet} = $PDF::Reuse::objNr; >- } >- if (! $PDF::Reuse::pos) >- { errLog("No output file, you have to call prFile first"); >- } >- return $namnet; >+ return prJpeg($imageData, $width, $height, $imageFormat); > } > > sub Js { >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13407
:
34173
|
34512
|
34533
|
34609
|
34610
|
34723
|
34724