When I used the slice tool on each part and export as HTML, does it generate a skeletal HTML code where it consists of frame layouts? I would like to know for both Photoshop CS4 and GIMP.
To give you a candid answer, the answer is "terrible HTML". As Scott said, Photoshop will produce a table based layout. The same goes for GIMP.
Here is a sample output for GIMP:
This is an incredibly outdated and incorrect way of web design. For a more detailed explanation on why, check out this article: Why tables for layout is stupid
It's okay to use Photoshop or GIMP to produce web design mock-ups, and it's okay to use the slice tool to subdivide and export necessary images for your site, but it is not okay to generate your HTML using the slice tool!
Adding to John's answer:
The slice tool (both in Photoshop or Gimp) lets you define rectangular areas to export as individual images, with some limitations: only one set of slices can exist per document, and slices cannot overlap.
The final result will be a table filled with images. Apart from the reasons mentioned before, tables are the worst idea for responsive layouts, because you can't change the order of the
Graphic programs are good for trying styles and preparing mockups (along with wireframing tools), but once you need to transition to HTML, the best thing you can do is write your own code.