Wednesday, March 17, 2010

Linux Photoshop

I have always delighted in giving myself projects with new programs, and one of my favorite things to use is Photoshop. I love exploring the infinite possibilities, and I like to slowly see myself get better and better with the tools that are given to me.

Working in an I.T. Department at a Stage College requires a lot of focus and the ability to solve many different kinds of computer problems. We have found various ways to fix these problems, thanks to some tools that we have been able to find. One of those tools is the use of a Puppy Linux Distribution, so that we can freely navigate all the Windows files and folders, and be able to delete anything that we want, or repartition a drive, or other things like that.

I took the (at the time) latest release of Puppy Linux from their website, and went to work. I boot from the live CD into a test computer, the typical computer that we receive from students (it is the recommended and supported school laptop). I ran through the live CD and found all the correct drivers and utilities that would be needed for us to easily work on the computers when they come in with problems that require us to use Puppy's safe environment. With Puppy fully functional and running exactly how we liked it to run, I needed to do something about the appearance. Puppy comes with a decent theme and background built in, but we wanted something unique for our I.T. Department.

This is where the Photoshopping comes into play.

I used a blank slate and began with a small idea on what I wanted to do. First, I knew that I wanted to incorporate the Puppy Linux puppy, and the word "Linux" in the photo. I quickly added "Linux" and curved it to my liking using the simple built in shapes tool. The next step was to add the puppy logo, but I wanted to make it look a little like a sphere, so I added a small amount of gradient inside an oval near the top of the logo, giving it that spherical look. I created a circle just outside of the logo, a little larger, then feathered it in order to created a sense of distance coming from the logo. I decided that just plain old Linux was too bland for the project, and created my own variation of the word. I strung a long eclipse from the 'I" to one half of the "X", and made it appear to be a ring. I set the ambience by blending a blue gradient into the background, and created a sense of infinity by hand drawing tons and tons of stars, all variations of sizes.

This is what I ended up with, and I am quite proud of the results.



Monday, March 8, 2010

EyeSaver.app


So I've been fooling around with Applescript for a while now, and I decided to give myself a little project. After a long day of sitting and staring at computer screens, my eyes aren't as happy as they were in the morning. When I get in my room and shut the lights off in order to just relax, the only thing that bothers me is the brightness of my screen. Of course, you might say, just turn the stupid brightness down. Well that would be a good idea but that doesn't mean that the white is gone, and it also reduces the focus of the screen, since the colors are getting closer to one another. I looked for a way to fix this problem, without causing the others, and it was quite simple; just invert the colors. With colors inverted, it is harder to view pictures and surf the internet, but I am not one to do that too often. Mainly, I sit on my computer, talk to friends on AIM (I don't MySpace or Facebook, I hate them). I also write my occasional program while sitting in my room.

Apple has a built in color inversion keyboard shortcut (Command + Option + Control + 8). I use this quite often now when I get home and my eyes need to relax but I am unable to get off the computer for either homework or etc. With the new Apples, however, they have a unique little feature that uses the ambient light sensors in the computer to auto-dim your display when the room gets darker. This function is great, and I wanted to write an applescript that utilizes that function with the needs of my own. I created an applescript that uses a C program to determine the current brightness of the display. The C program, as well as some others, is all thinks to Amit Singh, and can be viewed here. I revised the program a tiny bit, and instead of it printing the results to the screen, it writes them to a specific file.

The applescript I created first prompts the user whether the colors are currently inverted or not. It then creates a new folder in your /Library/Application Support/ folder called "EyeSaver." The C program saves a small txt file with the current brightness reading into that folder. The script then reads that value, and acts accordingly. The screen brightness is recorded as a value between 0 and 1, 1 being the brightest. If the screen brightness is below .5 (I have set that as default), then the applescript runs a quick "key code" command which inverts the colors for the user. It records whether or not the screen is inverted by reading a variable either as a 1 or a 0, then stores the new value in the variable if the colors were switched. The program is still in it's beginnings, and only either runs for a set number of seconds, or until you "sudo kill" it haha. I am looking to find a way so that the program can be running in the background or quit at any time.

The program takes up minimal CPU usage and barely any memory. I am confident that it works on a majority of Macs. Any questions or comments and I would be more than happy to reply.