000webhost

Web hosting

Friday, June 8, 2012

Crash Course in Security

My preliminary guesswork regarding my recent LibreOffice crashes were more correct accurate than I realised. What's actually happening is that in areas where the picture is larger/where strange cut/paste decisions are being made the program is actually having difficulties processing this data. This is reflected by a stall of several minutes (or eventual crash) in user space (workable under Microsoft Word but not under LibreOffice/OpenOffice at the moment). I've fiddled around with removing, changing the format, and compression level of the pictures themselves but obviously this does not scale well on large files (I'm not sure how long this is going to be yet.).

There does seem to be an option in Microsoft Word which will allow you to compress all images in the file though (there seems to be similar work occurring in LibreOffice/OpenOffice as well). I was able to achieve a size reduction from 5906KB to 5023KB. A substantial saving and one which has allowed me to re-open it (I've been standardising fonts/styles as well) and use it in OpenOffice/LibreOffice as well. Something else which I've realised is that where I've tracked changes I've made or the program has made odd formatting/styling decisions which have compounded the problem.

http://www.libreoffice.org/features/extensions/
http://user.services.openoffice.org/en/forum/viewtopic.php?t=6918
http://user.services.openoffice.org/en/forum/viewtopic.php?t=3665


In some other work had to deal with some browser compatibility issues (IE6). Something I came across was the history different in support levels between PNG as opposed to other formats in web browsers. If you've ever heard of or used ImagaMagick then you'll realise just how useful it is.

for i in *.jpg; do temp=`echo $i | sed s/jpg/png/`; convert $i $temp; done
for i in *.jpg; do temp=`echo $i | sed s/jpg/gif/`; convert $i $temp; done

Another thing you may notice is that even when using tools that are designed to deliberately compress image files depending on the algorithm there's only so far that you can take it.

http://pmt.sourceforge.net/pngcrush/

At a certain point it just comes down to the raw dimensions of the file itself. This is particularly the case with files that use lossless compression algorithms.

for i in *.jpg; do temp=`echo $i | sed s/jpg/png/`; convert -resize 25% $i $temp; done

The following are useful utilities for dealing with PDF files. I recently needed them to append multiple PDF's to one another/convert to other formats and didn't want to use a full blown editor. 

Saving Money (without Sacrificing), Random Stuff, and More

- use price matching when you can to get an extra discount. Note, a lot of companies advertise low prices just to get you through the door. ...