Converting CMYK .PSD files for use in GIMP

Though GIMP has some support for handling CMYK workflow there is one part that isn’t available and that is opening existing Adobe Photoshop files (.PSD) that use the CMYK model.

From a private book or card design point of view the one main place you’ll see these .PSD files is with online printers who provide you with only .PSD files as templates for the media sizes they print on. These files have a few or just one layer of the exact size that you have to make your material and so just happen to specify CMYK model rather than needing this.

GIMP cannot open these type of .PSD files if they use CMYK: GIMP can only open PSD files that use RGB. It will fail with the error message,

Error loading PSD file: Unsupported colour mode: CMYK

…and before you ask, no the separate+ plugin will not work here – that only has support for CMYK Tiff import and it does not alter how the existing PSD import works.

You have three to four options to help here,

a) Use the imagemagick convert program to convert the colour space to RGB and create
a PNG file. See http://www.imagemagick.org/script/convert.php

The command I use is,

convert input.psd -channel RGBA -alpha Set -colorspace rgb output.png

where input.psd is my input filename from the online printer service and output.png is the output filename I give the files.

If this is a single layer then it will create just the “output.png” whereas if it is layers then it will create layers plus one; a merged (or flattened) layer png which it names output-0.png and one file per layer called output-n.png where n is the layer from bottom to top e.g. output-1.png, output-2.png for a 2-layer image.

You may be asking why not make that a .XCF file i.e. the GIMP native format ?. Well if you try making the output a .XCF then you will probably get an error message like “Unsupported compression mode: 33535” if you try with the default compression or “Procedure ‘file-psd-load’ returned no return values” if you try without compression when you open that file in GIMP. So it doesn’t really make it a native GIMP XCF file as you can see that it still keeps the format as PSD. OK so what about .TIFF files ? Well if you try using .TIFF files (which are multiple pages) then it may work if all the pages are the same size but if one layer isn’t then GIMP will bork with “Calling error for procedure ‘gimp-image-resize’: Procedure ‘gimp-image-resize’ has been called with value ‘-2147482750’ for argument ‘new-width’ (#2, type GimpInt32). This value is out of range.” I think its safe to say that you should stay with a bunch of .PNG files.

b) Alternatively use an online web based reader that can work with CMYK mode
PSD files e.g. http://pixlr.com/editor/

c) Get a friend to open and save the file as a multiple page .TIFF or set the colour mode to RGB for a .PSD file for you.

d) Install a trial version of Photoshop. You would have 30 days or so to register so this is quite a complex process and really is a last resort.

Note that I’m only interested in opening these simple printer templates. If you have complex images from a graphics department that has created something for you in Photoshop and has sent you .PSD files then you are advised to use Photoshop if you depend upon a fidelity of the content because though GIMP handles layers in PSD files it has a few differences in any conversion process e.g. it will rasterize what should stay as a vector e.g. Text and other vector objects and it will lose layer masks and effects such as layer styles. Arguably a Photoshop user would be as equally stumped if sent a GIMP native .XCF file.

Also if the provided template actually uses colours and is trying to show you what this will look like (e.g. it is coloured stock) then unless you have setup your whole PC with the correct colour profiles (ICC files for the CMYK and process and your PC screen) then this is all going to be meaningless to you so you’re still going to have to rely on proofs to see if it looks like on paper is what you expected.

SLIB 1.8 build problem with GNUCASH

The Ubuntu repository for software lags the new versions for programs. This is a good thing because it would be a nightmare if it was updated for every nightly build for the  tens of thousands of packages !

But sometimes you want the latest version of an application and I wanted the latest version of GNUCash so I wanted to build from source.

I got some odd GUILE issues which are easily fixed as below for an Ubuntu 10.10 platform.

Assuming you have all your other GNUCash make dependencies correct you will probably still get a configure failure with the error,

checking for guile - 1.6.7 <= version < 99.99.99... yes: 1.8.7
checking for guile - 1.8.0 <= version < 99.99.99... yes: 1.8.7
checking for SLIB support... configure: error: 

Cannot find SLIB.  Are you sure you have it installed?
See http://bugzilla.gnome.org/show_bug.cgi?id=347922
and http://bugzilla.gnome.org/show_bug.cgi?id=483631

…because there is no Guile 1.8-slib package (there is a 1.6 package). The package does two things,

1) Adds a soft link in the Guile 1.X to SLIB

cd  /usr/share/guile/1.8/
 sudo ln -s ../../slib slib

2) Builds a slibcat file which can be done with this command,

sudo guile -c "(use-modules (ice-9 slib)) (require 'printf)"

Thus do those two steps and you’ll fix this SLIB issue and can proceed with your make.

Note that after building GNUCash you will probably get the error,

gnucash: error while loading shared libraries: libgnc-qof.so.1: cannot open  shared object file: No such file or directory

…which is because the ldconfig cache is not updated.
You must run,

sudo ldconfig -v

after you have done the make install to fix this issue.

Getting Plesk default domain page and not your WordPress install ?

If you have uploaded the WordPress files to a new site and are still getting the Plesk Default domain display then you have probably forgotten to delete the old Plesk skeleton site especially the index.html file. By default a site will pick the index.html before index.php and so the WordPress index.php file is never read.

You should ideally delete all of the files in this httpdocs location before uploading and installing a new site.

Using write-locked SD cards when virus hunting on Windows PCs.

Sometimes you want to check a client Windows PC that is suspected of having a virus and you want to install software that the Windows machine doesn’t have installed e.g. ProcessExplorer or SiSoft Sandra or similar as part of your preliminary checks.

You should keep  the suspect Windows PC away from the Internet so you want a safe way to quickly copy software.  Obviously this is now USB keys but all cheap USB keys I know of don’t have a “write-protect” switch. If there is a virus you want to prevent it copying itself to your USB keys else you’ll make some mistake and could end up with a Windows virus moving around your Windows test systems.

The easiest way to get a cheap write-protected USB key is to use a low cost SD card like you would use in a camera and a SD-USB adapter. Most, if not all, SD cards have a write-protect switch and SD to USB adapters are cheap. Load all your software that you expect to use onto the SD card, set the write-protect switch to lock and then plug this into  the USB adapter and then you can safely plug that into the suspect machine and start your investigations.  As far as I know the write-protect logic is part of  the SD reader so few viruses would be able to override that without a good understanding of that device driver and truthfully if you’ve got something that ingenious then a high level process view of such a Windows PC will probably find nothing amiss.

 

Epson DX5000 printing borderless – bogus paper jam error

This is a long story…..We have an Epson DX5000 with a CISS that was found at the trash with the CISS intact but the CISS ink feed tube guide/holder (that comes with your CISS kit) was broken off. Out of habit I collect printers for their motors and other parts but this is the first time I’ve seen an abandoned CISS (4 colour). I just had to see if I could make it work or, at least, re-use the CISS in another printer. It seemed to have around 50ml in each reservoir so a bit messy – but it was raining so the ink washed off (it is dye ink).

Without this little plastic guide in place the CISS ink feed tubes would drop and collide with the print carriage.  From experimenting with this I found you have to get this near perfect alignment else it just clips the print carriage as it zips back and forth. The plastic shrouds on the print carriage almost look designed to interfere with foreign objects like the CISS ink feed tubes. With the DX5000 then there is so little gap the scanner/printer cover pushes down and can hit this  ink feed tube guide and thus push it into the path of the print carriage.

Image showing position of tube guide and where to use gaffer/duct tape

Details of tube retainer position and use of gaffer/tape.

The fix I found is very easy. For the CISS ink feed tube guide I superglued it to a thin 1.5mm by 20mm x 20mm bit of foam rubber similar to what you use on the base of equipment as rubber feet and then glued this in place. This made it slightly more proud and so had a better tolerance in clearing the print carriage.

I then used gaffer/duct tape on the ink feed tubes where the tubes leave the printer. This keeps the tubes in place and especially keeps the printer cover just a little up and out of the way thus stopping it from pushing the CISS ink tube guide that I had glued in down into the print carriage.

I bleed the many air bubbles by lifting the CISS ink reservoirs up high. You never normally do this – the ink reservoirs must always normally stay on the same level as the base of the printer else they will siphon out. After a week it settled down and we’ve found it perfect for high-volume draft work such as book drafts. The CISS cartridges have auto-reset chips in them so when the ink levels are low then the chips reset themselves back to full. So that is the history of that printer.

Now the odd problem of the title: we have found is that if you want to do borderless then you must select Epson paper stock. If you say “plain paper” in the print driver then it says that this option is not available for this media and then resets the borderless setting off.

If you specify the Epson paper then the number of sizes in the media size option reduces and importantly for us for our test, the A5 disappeared as, I can guess, Epson do not do A5 card intended for borderless printing. If you try picking A4, but load your non-Epson A5 then it starts to load the paper but then it says “Paper Jam” though it provides an “Eject” button and that works fine so there isn’t really a paper jam per se.

I know this is true because if I pick plain paper A4 and load A5 stock landscape and only print a (normal with border) image then it works perfectly and prints on the A5 and then tractors the paper out without complaining that you told it was A4 but only fed A5.

The paper jam that it says that it has when you try this trick with non-Epson paper on borderless seems to be some catch-all complaint about the paper stock that it detects before it starts up to print. There is some kind of sensing logic at the start of the job when it runs the print head back and forth before it has started printing the image. Bit annoying as we wanted to print borderless on A5 scored card stock and can only do with-border.

 

Success through experience – the hard way.

If you’ve looked at the fixes I’ve listed here it seems that the fault and the solution are found without any problems and that there is a straight line between these two.

Not always so – I was able to fix the Acer flat panel screen because earlier in the year I had worked on the internals of two other screens (both trashware) without success; one was a generic 15in and one was an ex-medical system 17inch touch screen that I so want to fix. So by now I already had many hours of experience of dismantling, measuring voltages and re-assembling these kind of screens without injuring myself or damaging the parts but with much disappointment.

My experience on these found items means that I approached the most recent find with a lot more confidence and speed of dismantling and re-assembling and it was successful. Ultimately this knowledge all goes to benefit work I do for customers too.

GoDaddy FTP user password reset clears the 530 User cannot log in error.

When trying to connect to the Windows IIS 6.0 based hosting provider for one of our clients that has ASP styled web site with GoDaddy we got an unusual error message within Filezilla,

 Status:    Connecting to x.x.x.x:21...
 Status:    Connection established, waiting for welcome message...
 Response:    220 Microsoft FTP Service
 Command:    USER godaddyftpuser
 Response:    331 Password required for godaddyftpuser.
 Command:    PASS ************
 Response:    530 User godaddyftpuser cannot log in.
 Error:    Critical error
 Error:    Could not connect to server

The web site was working as expected – just no FTP access. To fix this we went into the GoDaddy user account administration window and under the Hosting Control center hosting dashboard we reset the password to the same password that we were using.

The Filezilla client was able to connect. Very odd. Will have to keep an eye on this one.

 

Using WP-Mail-SMTP if host provider has disabled PHP Mail

One of our hosting companies that we have a reseller account on has disabled PHP Mail function for security reasons. This causes the WordPress sites that use Contact Form 7 (with Really Simple CAPTCHA) to fail with,

“Failed to send your message. Please try later or contact administrator by other way.”

To fix this you need to enable the WP-Mail-SMTP  plugin. To install this download the plugin and upload to your site as normal and then activate this on a per-site basis (not Network activate).

You will now have new options in the Settings -> Email on your site dashboard of which the most important is “Send all WordPress emails via SMTP.”  (checked by default).

Set these parameters as per your hosting provider recommendation though you usually can just specify one of your own email addresses on your domain as the From Email and set it to localhost and no authentication and it should work.

It is usually only when the from email domain is not a local domain on that server that you will have problems and need to authenticate your connection or if the SMTP server is not “localhost”.

If you have it right then you will get the message “Your message was sent successfully. Thanks.”

 

 

Alt-gr key with @ not working on Italian keyboard in Windows 7

A client of ours a while back had picked up an ex-demo laptop and had got the shop they bought it from to install it as English. The keyboard remained as an Italian physical layout (which is a QWERTY layout but has extra accented characters).

Recently I was at their site and tried to use the laptop and noticed the @ (at) symbol wasn’t working. On the wall they had put up a note for people to use an ALT+064 sequence. OK but what !?

The fix was easy though not obvious at first glance (AltGr + q will actually print a @) and it is that there are two Italian keyboard layouts in Windows 7 – Italian and Italian (142).  This was set to “Italian (142)” where the AltGr+q is the @ key whereas it should have been set to just “Italian” where the AltGr+ò key is where the @ symbol is printed.

Added the layout (Language still English (British)) set the default language and layout to be just the “Italian”, and deleted the “Italian (142)” layout. Rebooted it to make sure that any applications hadn’t cached  the layout (Firefox seems to do this).

Keyboard now works as expected.

 

Easy repair of an Acer AL1721 flat panel (trashware)

Walked some trash to the rubbish bins and saw a 17inch Acer AL1721 flat panel screen (for a PC)  dumped at the bins. Don’t get to see many flat panels. Seemed to not have a cracked screen so I just had to take this back home.

At home I used a spare 5AMP 12 V DC power pack (centre positive) I had similar to what is used for CCTV cameras and it kind of worked but screen blanked out when DC plug was wiggled.

This had to be easy to fix so I unscrewed the screen back (4 x small black screws and 4 x larger plated screws under the stand mount covers) and then popped off the front bezel screen surround and removed the back (take care to un-plug the screen controls plug).

The PSU is slightly different from other screens and is an all-in one with the backlight high volt supply and the logic supply together on the same PCB. The fault was easy to find though – there is a choke on the DC input on the PCB and that had a visible dry joint.  I can only assume some contamination on the pin when it was soldered at the factory.

Dry Joint on PSU PCB

Dry Joint on PSU PCB

I solder-sucked and scraped the pin with a knife edge to the copper on the pin and then re-soldered. There was also a 470uF 16VDC electrolytic that was swollen (HERMEI brand) though my ESR meter did not show a problem. I replaced it anyway given it was swollen (the spare capacitor was cannibalized from the power section of an old CDROM drive so this fix cost me nothing).

Swollen Capacitor on AL 1721 PSU PCB

Swollen Capacitor on AL 1721 PSU PCB

 

It works; stable at 1280×1024 75Hz on a GNU/Linux server running Ubuntu 10.10 with on-board ATI Radeon 3000 graphics (ASUS M4A78LT-M LE motherboard).

Vodafone RAS error code 635 not always a technical problem

A client had got a RAS error code 635 when using a Vodafone Mobile Broadband Lite USB key. It was working fine the day or so before and now it doesn’t work. The error message has lots of things you can try regarding devices and account types but the first thing you should check if this is a contract account is to verify that the account is in order if the service was working fine and now has stopped.

After re-installing the device and installing on a different laptop it really did look to be a problem with the Vodafone side. The client checked with the helpdesk and found that their contract payment hadn’t gone through. The problem is that the client had moved banks and the standing order from the new bank wasn’t setup. Vodafone (quite rightly in some regards) had disabled the SIM/account.

The client is now settling the account and making sure the bank standing order is working….and after a couple of hours delay the USB key is now connecting.

 

International Amazon Kindle not charging from USB ?

A client of ours had got a Kindle recently and seemed happy with it but the batteries kept going flat.  I checked and it seemed to be charging fine so I dug a bit deeper and this what I found.

The PC is a brand new laptop running Windows 7 Home Premium –  I know as I re-installed that as English a few weeks ago. The power management was left as the default of Balanced.

The quirk with this is that they leave the Kindle plugged in when they go out but the Balanced power setting on Windows 7 by default shuts the PC down in 30 minutes (when on mains) when idle.

The Kindle needs 4 – 6 hours to charge thus it will never really charge unless you stop the Laptop from going into power save mode. I changed the Balanced on-mains power shutdown period to 4 hours to at least give the Kindle a chance to get a charge.

I imagine that other people have had this without really thinking about what is happening.

 

HIgh CPU with system process on Windows XP ?

The system process (not the system idle) can go to high CPU use. To narrow down what is causing this you need to narrow it down to a thread that system is managing.

Do this by downloading the System process explorer from Microsoft. Download and run the procexp.exe program that the .zip file contains. click “run” and then “run” again on the dialogs (you basically run this program – not install it).

It runs and display a more complex system overview than the taskmanager. Sort on the “Process” column and then find and right-click the “System” process and pick “Properties”.

You can now pick the “Thread” tab and sort on the CPU column and find out which driver is running the high CPU. To see where and what version this file is click the line e.g. amdk8.sys and then click the “module” button. It will pop up a normal File Properties dialog box.

You have all you need now to search technical help sites or your hardware provider to see if there is updated software for this driver: searching for “amdk8.sys high cpu” is a lot better than searching for just “system high cpu”

 

Taskmgr.exe at 100% CPU ?

On older laptops you may start seeing this problem. It seems to be caused by the CPU going into a protective shutdown whereby it reduces the clock rate to a small amount (seen on a Celeron-based IBM R31 laptop).

In Task Manager (ctrl+alt+del) then you will see 100% CPU with taskmgr.exe consuming a lot of this.

The laptop will run very slow and if you can get CPU-Z running it will show up a low core speed.

The only temporary fix is to reboot (sometimes hard shutdown by push-and-hold the power button for 10 seconds) but if the machine has cooling problems then this is not going away and you’re going to have to investigate deeper into the machine.

 

Using mozBackup – awesome program

My main laptop that I use on a daily basis just is not surviving this weather (we’re 30 DegC indoors). It’s a 5 year old IBM that has had a hard life but the CPU is overheating and so the CPU is going into thermal shutdown.

I’m migrating my settings to a spare Laptop whilst I pull apart the IBM to fix it.

The new laptop is a clean build from bare metal and whilst I can copy files from backups I need to also copy my profile for Firefox and Thunderbird.

I used mozBackup and it works perfectly. I installed version 1.5.1 on the old laptop, performed the backup of Firefox (version 5.0) and Thunderbird (version 3.1.11) and then installed the mozBackup on the new laptop and did a restore (Firefox is 5.0 but Thunderbird on the new laptop is 5.0 as well).

All my emails, passwords and settings have been copied perfectly. The Firefox backup file was only a few megabytes but the Thunderbird was just over 1 Gigabyte. I have a dozen email accounts and hundreds of thousands of emails. This is a real torture test for that program and it worked perfectly.

I have enigmail and lightening so you’ll have to update these to the new versions but Thunderbird does this for you when you first use it. Also on the new laptop I have installed GNU-PG version 2 so you’ll have to set the OpenPGP preferences to the gpg2.exe file but that is about it.

I’ve just donated some money to this developer. This is the second time in 4 years that I have used this program and it’s done the job just right.