Creating photo thumbnails?

I hate to use the "F" word, but in FrontPage I could use
Ctrl-T to change a photo on a page to a thumbnail, and it created
the link to the original.
How do I do this in DW CS3? I did Commands/Create Web Photo
Album, but that wants Fireworks. I can't afford to by FW now. Isn't
there a simpler way other than manuall creating the Thumbnails and
linking them to the originals?
I hate that I may have lost a function I used often in FP.
Gary

"Joris van Lier" <[email protected]> wrote:
>>"Clancy" <[email protected]> wrote
>> PHP has very good functions for manipulating photos,
including producing
>> thumbnails,
>
>Please do preferably with code examples that we can turn
into
>ServerBehaviors :)
The image manipulation facilities are a bit slow (6-10
seconds per set of 3
images), so I only use them to set up the working images on
my own PC, before I
upload them. I haven't tried running them on the remote
server. $quality is a
constant which determines the quality and degree of
compression of the new
image. 100 gives no compression, 80 gives a good-quality
image of reasonable
size, but anything much below 70 gives very obvious "ringing"
on things like
telegraph poles against a blue sky.
I don't know about 'ServerBehaviors', so you'll have to work
that out :)
Notice that in my example procedure I reset the time limit
for every new image.
I normally set this to 1, so I don't wait foreverwhen I write
the inevitable
infinite loop, but this way I don't time out halfway through,
but I don't wait
for ever if I do write an infinite loop.
These functions worked for me with php set up as instructed
by David Powers in
his book "PHP for Dreamweaver 8".
To get the EXIF information function working I had to
uncomment the lines:
extension=php_mbstring.dll (already included)
extension=php_exif.dll
in the file php.ini
A. Shrink image.
<?php
// Set up $orig_image as full path/file name of image to be
reduced
// eg Flowers/Orchids/Diuris/DSCN1055.JPG
// 1. Create an image object (presumably a bit map?) from it.
$wkg_image = imagecreatefromjpeg($orig_image); // Working
copy of original
image
// 2. Get original size
$size = getimagesize ($orig_image); // Get dimensions
// 3. Decide new dimensions (the magic numbers used here are
explained in the
example below)
$height = $scale[$k][0]; $width = (int) ($height*$ratio);
// 4. Decide where to put target. Again full path/filename
$target = $path.$image;
// 5. Create a temporary image object the size of the new
image.
$temp_image = imagecreatetruecolor($width, $height);
// 6. Resample the image into the new object (if you replace
the zeroes with
offsets you can specify a portion of the image to be sampled
-- I haven't tried
this)
imagecopyresampled($temp_image, $wkg_image, 0, 0, 0, 0,
$width, $height,
$size[0], $size[1]);
// 7. Convert it to JPEG
imagejpeg($temp_image, $target, $quality);
// 8. Discard the temporary images.
imagedestroy($temp_image);
imagedestroy($wkg_image);
// Done!
B. Procedure to list all EXIF (image header data). I'm not
too sure how this
works, but it does! (Comes from the manual.)
// Specify source file
$old_image = 'Dev/Original/DSCN0389.jpg';
echo '<p>T:153. Trying to read data from
'.$old_image.'</p>';
$exif = exif_read_data($old_image, 0, true);
echo "T:157 '.$old_image.':<br />\n";
foreach ($exif as $key => $section)
foreach ($section as $name => $val)
echo "$key.$name: $val<br />\n";
C. Actual procedure to scan directory, get updated files, and
generate large,
medium and thumbnail images meeting specific size
constraints. (Large fits
nicely on 1280*1024 screen, Medium on 1024*768 screen.)
// (This is not written as a procedure, just included when
needed. It is
included purely to show you an actual working example using
these functions)
// 23/10/07 Created
$get_img = array (false, false, false);//
$changed = false;
$quality = array (80, 80, 75);
$img_dirs = array ( 'Large/', 'Images/', 'Thumbs/' );
$pattern = ".jpg"; // I only want .JPG images
// Apply different algorithms according to shape of image and
required size.
$limits = array (
0 => array ( 1.05, 1.61 ), // Large image
1 => array ( 1.0, 1.725 ), // Normal image
2 => array ( 0.1, 1.125 )); // Thumb
$scale = array (
0 => array ( 830, 770, 1240), // Maximum dimensions
(Height for portrait, then
landscape, then width for superwide)
1 => array ( 610, 550, 950),
2 => array ( 160, 160, 180));
// See which sizes have been requested.
if (array_key_exists('ck_l', $_POST)) { $get_img[0] = true; }
//echo
'<p>Im_2_22: $get_img[0] = true</p>';}
if (array_key_exists('ck_m', $_POST)) { $get_img[1] = true; }
//echo
'<p>Im_2_23: $get_img[1] = true</p>'; }
if (array_key_exists('ck_t', $_POST)) { $get_img[2] = true; }
//echo
'<p>Im_2_24: $get_img[2] = true</p>'; }
// Abandon if 'Cancel' set.
if (array_key_exists('cancel', $_POST))
$edit_data['action'] = 0; $edit_data['ind_act'] = 0;
$changed = 0;
else
$dir = $edit_data['f_path'].'Original';
//echo ('<p>Im_2_34: Trying to open
'.$dir.'</p>');
f (is_dir($dir))
if ($dh = opendir($dir))
//echo "<p>Im_2_39: ".$dir." opened OK.</p>";
while (($image = readdir ($dh)) !== false)
$orig_image = $dir.'/'.$image;
if (stristr ($orig_image, $pattern))
//echo "<p>Im_2_46: Next image =
".$orig_image."</p>";
$src_date = date ("ymdhis",filectime($orig_image)); // Get
date file
updated
set_time_limit(4);
// Got an image. K = 0 (large), 1 (normal), 2 (thumb)
// See if already present, and later version
$wanted = false;
$k = 0; while (($k < 3) && (!$wanted))
$w[$i] = false;
if ($get_img[$k]) // Want this size?
$target = $edit_data['f_path'].$img_dirs[$k].$image;
if ((!file_exists($target) || (date
("ymdhis",filectime($target))
<= $src_date)))
$wanted = true; $w[$k] = true;
$k++;
if ($wanted)
$wkg_image = imagecreatefromjpeg($orig_image); // Working
copy of
original image
$size = getimagesize ($orig_image); // Get dimensions
$ratio = $size[0]/$size[1]; // Calc ratio of width to height
echo '<p>Im_2_72: Size = '.$size[0].', '.$size[1].',
'.$ratio.'</p>';
$k = 0; while ($k < 3)
if ($w[$k]) // Want this size?
if ($ratio > $limits[$k][0])
if ($ratio > $limits[$k][1])
$width = $scale[$k][2]; $height = (int) ($width/$ratio);
else
$height = $scale[$k][1]; $width = (int) ($height*$ratio);
else
$height = $scale[$k][0]; $width = (int) ($height*$ratio);
$target = $edit_data['f_path'].$img_dirs[$k].$image;
echo '<p>Im_2_76: $k = '.$k.', Width = '.$width.',
Height = '.$height.', orig:
'.$size[0].' * '.$size[1].', Target = '.$target.'</p>';
$temp_image = imagecreatetruecolor($width, $height);
imagecopyresampled($temp_image, $wkg_image, 0, 0, 0, 0,
$width, $height,
$size[0], $size[1]);
imagejpeg($temp_image, $target, $quality[$k]);
imagedestroy($temp_image);
$k++;
imagedestroy($wkg_image);
$changed = 1; // Magic numbers for my program
$edit_data['action'] = 0; // Flag file written correctly
$edit_data['ind_act'] = 2; // Generate index logical next
step
?>
Clancy

Similar Messages

  • How can I create only thumbnails photo page without larger photo

    Is there a way to create photo page without the larger photo?

    I wonder if you can use a photo template page to drop your photos into and then just leave off the slideshow button. I wonder if that will disable the click to enlarge photo function or if it just affects the slideshow stuff.
    Otherwise, you could manually make your thumbnails page...like a contact sheet.
    1. Use something like iPhoto to export photos scaled down to thumbnail size, like 100x133, into a folder on the desktop
    2. Drag and drop thumbnails from this folder into iWeb using blank template page.
    3. select all the thumbnails, open up the Inspector ruler tab, click on "Use orignal size".
    4. Arrange thumbnails in desired order and position on page.
    This is a complete manual job. I don't know if there is any other way besides disabling the slideshow function. I would probably live with the "click to enlarge" function over making a contact sheet by hand.

  • How do I create photo page with blow up images on click?

    I need some help trying to create a web page of photo thumbnails with blow-up larger images:
    1) I want to create a contact sheet type of web page of multiple photo thumbnails.
    2) When you click the photo it opens into a small window or "blow-up" version of the thumbnail. (Clicking the thumbnail does NOT take you to a new page with the full size image).
    3) The blow-up photo has a circle and X that will close the blow-up window.
    I've already figured out how create pages of thumbnails that will take you to a new page with the full size image. I'm trying to create the effect where you never leave the main page, the thumbnails just blow-up into small windows that can be closed again.
    Apple uses this effect a lot with photos and movie clips on their page. An example of what I am trying to do can be found on the iLife/iPhoto/MobileMeGallery info page at Apple.
    If you look to the right just under the main large banner images, there is a grey box titled "iPhoto Showcase." If you click one of the thumbnails there, the picture blows out to a larger size of the image, but doesn't take you to another page. The blow-up image has a little circle and X at the top left to close the window. Main page is still visible behind the blow-up window.
    I'm using a fairly new MacBook with OS 10.5, iPhoto and iWeb '08. I also have Aperture 2.0. I don't have a .Mac or MobileMe account yet. I'm a recent convert from the Darkside, so right now I use google's Picasa Web Albums and google's website creator for my site. If I can get this to work, I'll make the switch MobileMe once the early .Mac conversion kinks get worked out.
    Thanks,
    TDizzle...

    Cyclosaurus--
    That's the effect that I'm looking for. I've read through the instructions on Cabel's website (thanks for the great links!) But I'm afraid I'm still a bit of a novice with website creation and editing. I liked your iWeb examples, so I have a few follow-up questions about how to integrate this with iWeb.
    1) Do you use iWeb and .Mac/MobileMe to publish your site? I already own a domain and have been using google's online page creator tools to create some very basic pages. For picture pages, I just put up links to my Picasa web albums. But the google user interface and options (no FTP upload) are even more limited than iWeb and .Mac. With 20GB of storage, plus the other features and ability for integration, MobileMe sounds enticing for the price.
    2) At what point do you add the code to the pages in the edit and publish process? What are the exact steps you use to publish? (Create and edit in iWeb, add html code, publish to folder or publish straight to .Mac/MobileMe, etc.)
    3) If you make changes to pages in iWeb, do you have to keep adding the code to the pages and repeat the steps from above question?
    4) What app do you use to edit the html code? No html edit function in iWeb, so I tried opening the "page.html" files in TextEdit but the page just looked like a web page. No code. How do I get the text of the html code to open in TextEdit or another app?
    5) Do the lines of code (2 lines in "head" and 1 line in "body") need to be added to every page that I want to use the effect?
    6) How do you upload the two FancyZoom folders to a .Mac/MobileMe account site? And where exactly do they need to be placed?
    Thanks,
    TDizzle...

  • How do I create photo page with blow up images?

    I need some help trying to create a web page of photo thumbnails with blow-up larger images:
    1) I want to create a contact sheet type of web page of multiple photo thumbnails.
    2) When you click the photo it opens into a small window or "blow-up" version of the thumbnail. (Clicking the thumbnail does NOT take you to a new page with the full size image).
    3) The blow-up photo has a circle and X that will close the blow-up window.
    I've already figured out how create pages of thumbnails that will take you to a new page with the full size image. I'm trying to create the effect where you never leave the main page, the thumbnails just blow-up into small windows that can be closed again.
    Apple uses this effect a lot with photos and movie clips on their page. An example of what I am trying to do can be found on the iLife/iPhoto/MobileMe Gallery info page.
    http://www.apple.com/ilife/iphoto/#mobilemegallery
    If you look to the right just under the main large banner images, there is a grey box titled "iPhoto Showcase." If you click one of the thumbnails there, the picture blows out to a larger size of the image, but doesn't take you to another page. The blow-up image has a little circle and X at the top left to close the window. Main page is still visible behind the blow-up window.
    I think this post mentions what I'm trying to do, but they seem to be having problems getting it to work. I need help creating this effect from scratch.
    http://discussions.apple.com/thread.jspa?threadID=1609046
    I'm using a fairly new MacBook with OS 10.5, iPhoto and iWeb '08. I also have Aperture 2.0. I don't have a .Mac or MobileMe account yet. I'm a recent convert from the Darkside, so right now I use google's Picasa Web Albums and google's website creator for my site. If I can get this to work, I'll make the switch MobileMe once the early .Mac conversion kinks get worked out.
    Thanks,
    TDizzle...

    Cyclosaurus--
    That's the effect that I'm looking for. I've read through the instructions on Cabel's website (thanks for the great links!) But I'm afraid I'm still a bit of a novice with website creation and editing. I liked your iWeb examples, so I have a few follow-up questions about how to integrate this with iWeb.
    1) Do you use iWeb and .Mac/MobileMe to publish your site? I already own a domain and have been using google's online page creator tools to create some very basic pages. For picture pages, I just put up links to my Picasa web albums. But the google user interface and options (no FTP upload) are even more limited than iWeb and .Mac. With 20GB of storage, plus the other features and ability for integration, MobileMe sounds enticing for the price.
    2) At what point do you add the code to the pages in the edit and publish process? What are the exact steps you use to publish? (Create and edit in iWeb, add html code, publish to folder or publish straight to .Mac/MobileMe, etc.)
    3) If you make changes to pages in iWeb, do you have to keep adding the code to the pages and repeat the steps from above question?
    4) What app do you use to edit the html code? No html edit function in iWeb, so I tried opening the "page.html" files in TextEdit but the page just looked like a web page. No code. How do I get the text of the html code to open in TextEdit or another app?
    5) Do the lines of code (2 lines in "head" and 1 line in "body") need to be added to every page that I want to use the effect?
    6) How do you upload the two FancyZoom folders to a .Mac/MobileMe account site? And where exactly do they need to be placed?
    Thanks,
    TDizzle...

  • Rearranging photo thumbnails in Organizer window

    Is there a way to rearrange photo thumbnails manually in the Organizer? Most software enables a drag-and-drop function but apparently not here. Any suggestions? Thanks.

    Philip
    In the full Organizer, the Views available (lower left corner) are Newest, Oldest, Folder and Import Batch. Within the full Organizer, I don't believe you can do as you wish.
    If you make a collection, you can re-arrange the images within the collection by dragging and dropping. This is often used to re-arrange pictures for a specific project, making a slide show or web page say.
    I guess in theory you could create a collection that included all your pictures and then drag and drop within that. Never tried this so you may run into some kind of file limit.

  • When I drag a picture into my imovie it creates a thumbnail but when it plays over it, it shows the picture in front of it and not the picture...and when I go to crop adjustments it shows a black screen. How do I fix this?

    when I drag a picture into my imovie it creates a thumbnail but when it plays over it, it shows the picture in front of it and not the picture...and when I go to crop adjustments it shows a black screen. How do I fix this?

    I had a similar problem, and i found that the photo was of very low resoluton. As a test I resized the image to a lrager resolution using photoshop CS4 and re saved it as JPG. I imported the new saved image and it seem to have fixed the problem.

  • User profile sync Sharepoint 2010 photos thumbnail with AD and Lync 2010 - error on Full Synchronization- get events 8311, 6110, 6803 FIMSynchronization Service

    User profile sync Sharepoint 2010 photos thumbnail with AD and Lync 2010 - error on Full Synchronization- get events 8311, 6110, 6803 FIMSynchronization Service
    We're trying to set up sync between Sharepoint and AD so photos are displayed in Lync.
    The certificate referenced in 8311 is not the sharepoint root cert, its the UCC cert with our FQDN of the site. sharepoint.domain.com
    Is this causing the problem with the sync and holding up the photos?
    I have tried several proposed fixes, it hasn't helped.
    tried this as well:
    http://blogs.technet.com/b/praveenh/archive/2011/05/11/event-id-8311-certificate-validation-errors-in-mss-2010.aspx
    Josh

    Try this fix and see if its sync the photos:
    http://blogs.technet.com/b/steve_chen/archive/2010/09/20/user-profile-sync-sharepoint-2010.aspx#Profile Picture Property
    http://blogs.technet.com/b/steve_chen/archive/2010/09/20/user-profile-sync-sharepoint-2010.aspx#SyncPicAD2SPS
    Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation <mySiteHostURL>
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Is there a way to create a thumbnail for QuickTime videos on a PC?  All the videos currently have the same QuickTime logo as there thumbnail.

    Is there a way to create a thumbnail for QuickTime videos on a PC?  (Windows XP)  All the the videos currently have the same QuickTime logo as their thumbnail.

    Abdur,
    In the sheet :: table :: cell that is going to receive the data, type an equals sign, then click on the cell that the data will come from and press Return.
    This will require that you navigate to the origin cell by choosing the proper sheet.
    Jerry

  • How can I add a photo to a newly created photo book it the photo wasn't in the album I made the book from? thnx

    how can I add a photo to a newly created photo book it the photo wasn't in the album I made the book from? thnx

    Drag it to the book project in the source pane on the left
    LN

  • Purpose: to create photo galleries to insert or not items: 1) with phocagalery, it works 2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see noth

    purpose: to create photo galleries to insert or not items:
    1) with phocagalery, it works
    2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see nothing in the media in content management
    Can you help me

    Mahsa21,
    We are glad that we were able to resolve the international calling plan issue for you.  If you need assistance,please  reach out to us.
    thanks,
    Tonya D.

  • Create photo albums in the ipad

    How can I create photo albums in the Ipad

    When in the photos app tap on edit (top right) and then you will see the option to create a new album (top left)

  • How do I create photo folders in my iPad

    How do I create photo folders in my IPad ?

    You have to create the folders on your iMac first, then sync with your iPad using iTunes.  Then, the folders show up as albums on the iPad.

  • How do You Create Photo Albums without PC - Lumi...

    My second week helping someone with ther Nokia 800 
    Recomending this  phone will be  with me forever Its only now I am finding  all the faults that all the foroums show
     The first thing was the  small text font size that you can not alter ! 
     Now she want  to create photo almbums on the Phone and  Rename  as she did on her C3-01
    " Not unrreasonable "
     Only to find this Can not be Done without a PC she want to do it on the Phone same as all other Phones as she has no PC
    Is there a way this can be done?
     This Ones software seems to have gon backwards 
    Moderator's note: We have provided a subject-related title to help other forum users easily view and respond to this post.
    Nokia 701 Helping with Lumia 800

    Well as you seem uninterested in a more extensive answer what else is there. A Windows Phone device is not 'on it's own' so to speak it is part of an ecosystem which includes Skydrive, your Micrsoft account and more. As such it uses features provided by these resources. 
    As the OS is very secure it does not allow too much tinkering with the 'inside' instead it allows you to pull in information from a number of sources. Your Photo Albums are on Facebook, Skydrive and other locations. There they can be edited/renamed or whatever. This has always been the way WP is designed even before other started copying this behaviour as it makes sense.
    In a few years time _everyone_ will be using the cloud like this and it will be a none-issue. When the time comes just remember WP was the frontrunner in this and the other systems followed their lead.. 
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..

  • Photo stream "public website" in Internet Explorer - photo thumbnail's are gray, individual photo view is fine. Tested from various computers. No issue with Firefox, Safari or Chrome.

    Dear All,
    Recently I have started to use Photo Stream available from iCloud on iPhone device. I have made “test” photo stream with several photos in and set to “public website” in order to share photos with my relatives.
    The issue is with Internet Explorer where list of photos (thumbnails) are shown in gray color. I can view photo one by one and slideshow also works fine.
    On other computers IE behaves the same way.
    https://www.icloud.com/photostream/#A2532ODWsAl87
    No issue with photo list in thumbnails using Safari, Chrome or Firefox.
    Can someone help on this issue?
    It is very convenient to share photos via photo stream, but most of viewers by default has IE and many of them don’t have iCould account or apple device.
    Kind regards,
    M

    Dear safari rss
    Indeed, you are right, I have updated IE to version 10 and no issue with page view.
    Solution woud be to update IE to version 10 (I have not tested IE9).
    However users using Windows XP can have highest IE version 8. IE9 or IE10 is not suported in XP.
    Unfortunatelly there are still many windows XP at my friends circle.
    Thank you,
    Best regards

  • How do create a thumbnail in iphoto? I want to attach it to my e-mail sig.

    How do I create a thumbnail to attach to my e-mail sig?
    Thanks.

    At the Size option you can select 'Custom' and specify any size you choose.
    Regards
    TD

Maybe you are looking for