java.lang.IllegalAccessError

Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
(ref.)

... identifying the class in the Extensions and adjusting/removing the corresponding .jar should help. Anyways, don't understand why packing dependencies within the same jar as the actual one of a library.

Permalink
Posted in: |

webtuesdayhackday



The first webtuesday hackday took place past saturday at the new and shiny Liip office. Doing things at the office in an informal and unconstrained atmosphere with others was fun. Had to leave early in the afternoon, so no big accomplishments. Just did some small improvements for the Zend_Config_DomXml proposal.
Permalink
Posted in: |

pdfbox - retrieve text and document information

FileInputStream stream = new FileInputStream(new File(filepath));
PDDocument document = PDDocument.load(stream);
if (document.isEncrypted()) {
    try {
        document.decrypt("");
    } catch(Exception e) {
        System.out.println(e.getMessage());
    }
}

// get document information (Title, Subject, Keywords, etc.)
PDDocumentInformation info = document.getDocumentInformation();

// get string containing all text without formatting etc.
PDFTextStripper stripper = new PDFTextStripper();
String textContent = stripper.getText(document);

Reference: http://www.pdfbox.org/javadoc/index.html

Permalink
Posted in:

MagickWand

The MagickWand API is the recommended interface between the C programming language and the ImageMagick image processing libraries. Unlike the MagickCore C API, MagickWand uses only a few opaque types. Accessors are available to set or get important wand attributes.
i.e....
#include <wand/MagickWand.h>
MagickBooleanType status;
MagickWand *magick_wand;
PixelWand *pxlwnd;

int main() {
 
    /* Using MagickWand for rotating a png */
    magick_wand = NewMagickWand();
    pxlwnd = NewPixelWand();
    status=MagickReadImage(magick_wand, pngfile);
    if (status != MagickFalse) {
        MagickRotateImage(magick_wand, pxlwnd, 270.0);    	   
        status=MagickWriteImages(magick_wand, pngfile, MagickTrue);
        if (status != MagickFalse) {
             DestroyMagickWand(magick_wand);
        }

    return 0;
}

MagickWand needs to be linked against various libraries.
#: gcc `Wand-config --cflags --cppflags` -c wand/wand.c
#: gcc -o wandtest wand.o wandtest.c `Wand-config --ldflags --libs`
The API is very comprehensive - have yet only caught a glimpse of its whole function spectrum. There is a php extension too which follows pretty much the  structure of the  C api.


Permalink
Posted in: |

mp3 frame length

framesize (fs) = 1152 Samples/Frame (Layer 2 and 3 only)
bytefactor = 1152 Samples/Frame / 8bits = 144 
FrameLength (fl) = bytefactor * (BitRate / SampleRate) + Padding

fl = 144 * (128'000 / 44100 ) + Padding = 418 bytes

Framelength may vary within the same file due to different paddings or vbr encoding.
→ http://www.dv.co.yu/mpgscript/mpeghdr.htm

Permalink
Posted in: | |

1-5/5

LiveSearch

Blogroll

Relayed

Archive

Buttons

  • RSS 2.0 Feed
  • Latest comments
  • XHTML 1.0 compliant
  • Powered by Flux CMS
  • Powered by Popoon

Login


BXCMSNG Errors:
Notice[8] Undefined index: 0 in [BX_PROJECT_DIR]/inc/bx/plugins/blog/categories.php at line 59.