diff options
| author | Joakim Verona | 2010-08-19 09:29:27 +0200 |
|---|---|---|
| committer | Joakim Verona | 2010-08-19 09:29:27 +0200 |
| commit | 549a73b97bce9fe51547332424e0a6cb7070df1a (patch) | |
| tree | 1d646442d93e04c46897685d4ff2899980f9ef78 /src | |
| parent | b0c396f73b2320e664e6bc620c12d0d6ac6ded51 (diff) | |
| download | emacs-549a73b97bce9fe51547332424e0a6cb7070df1a.tar.gz emacs-549a73b97bce9fe51547332424e0a6cb7070df1a.zip | |
some minor cosmetic fixes in comments
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/image.c b/src/image.c index 176d3b41d09..e2aeae3f357 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7484,8 +7484,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7484 | /* Handle image index for image types who can contain more than one | 7484 | /* Handle image index for image types who can contain more than one |
| 7485 | image. Interface :index is same as for GIF. First we "ping" the | 7485 | image. Interface :index is same as for GIF. First we "ping" the |
| 7486 | image to see how many sub-images it contains. Pinging is faster | 7486 | image to see how many sub-images it contains. Pinging is faster |
| 7487 | than loading the image to find out things about it. | 7487 | than loading the image to find out things about it. */ |
| 7488 | */ | ||
| 7489 | printf("im ping file %s\n", filename); | 7488 | printf("im ping file %s\n", filename); |
| 7490 | image = image_spec_value (img->spec, QCindex, NULL); | 7489 | image = image_spec_value (img->spec, QCindex, NULL); |
| 7491 | ino = INTEGERP (image) ? XFASTINT (image) : 0; | 7490 | ino = INTEGERP (image) ? XFASTINT (image) : 0; |
| @@ -7516,8 +7515,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7516 | 7515 | ||
| 7517 | DestroyMagickWand (ping_wand); | 7516 | DestroyMagickWand (ping_wand); |
| 7518 | /* Now, after pinging, we know how many images are inside the | 7517 | /* Now, after pinging, we know how many images are inside the |
| 7519 | file. If its not a bundle, just one. | 7518 | file. If its not a bundle, just one. */ |
| 7520 | */ | ||
| 7521 | 7519 | ||
| 7522 | if (filename != NULL) | 7520 | if (filename != NULL) |
| 7523 | { | 7521 | { |
| @@ -7545,7 +7543,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7545 | /* If width and/or height is set in the display spec assume we want | 7543 | /* If width and/or height is set in the display spec assume we want |
| 7546 | to scale to those values. if either h or w is unspecified, the | 7544 | to scale to those values. if either h or w is unspecified, the |
| 7547 | unspecified should be calculated from the specified to preserve | 7545 | unspecified should be calculated from the specified to preserve |
| 7548 | aspect ratio. */ | 7546 | aspect ratio. */ |
| 7549 | 7547 | ||
| 7550 | value = image_spec_value (img->spec, QCwidth, NULL); | 7548 | value = image_spec_value (img->spec, QCwidth, NULL); |
| 7551 | desired_width = (INTEGERP (value) ? XFASTINT (value) : -1); | 7549 | desired_width = (INTEGERP (value) ? XFASTINT (value) : -1); |
| @@ -7557,12 +7555,12 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7557 | 7555 | ||
| 7558 | if(desired_width != -1 && desired_height == -1) | 7556 | if(desired_width != -1 && desired_height == -1) |
| 7559 | { | 7557 | { |
| 7560 | /* w known, calculate h*/ | 7558 | /* w known, calculate h. */ |
| 7561 | desired_height = ( (double)desired_width / width ) * height; | 7559 | desired_height = ( (double)desired_width / width ) * height; |
| 7562 | } | 7560 | } |
| 7563 | if(desired_width == -1 && desired_height != -1) | 7561 | if(desired_width == -1 && desired_height != -1) |
| 7564 | { | 7562 | { |
| 7565 | /* h known, calculate w*/ | 7563 | /* h known, calculate w. */ |
| 7566 | desired_width = ( (double)desired_height / height ) * width; | 7564 | desired_width = ( (double)desired_height / height ) * width; |
| 7567 | } | 7565 | } |
| 7568 | if(desired_width != -1 && desired_height != -1) | 7566 | if(desired_width != -1 && desired_height != -1) |
| @@ -7587,8 +7585,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7587 | crop function in ImageMagick. This crop function seems to do | 7585 | crop function in ImageMagick. This crop function seems to do |
| 7588 | less copying than the alternatives, but it still reads the | 7586 | less copying than the alternatives, but it still reads the |
| 7589 | entire image into memory before croping, which is aparently | 7587 | entire image into memory before croping, which is aparently |
| 7590 | difficult to avoid when using imagemagick. | 7588 | difficult to avoid when using imagemagick. */ |
| 7591 | */ | ||
| 7592 | 7589 | ||
| 7593 | int w,h,x,y; | 7590 | int w,h,x,y; |
| 7594 | w=XFASTINT(XCAR(crop)); | 7591 | w=XFASTINT(XCAR(crop)); |
| @@ -7604,8 +7601,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7604 | /* | 7601 | /* |
| 7605 | TODO background handling for rotation specified_bg = | 7602 | TODO background handling for rotation specified_bg = |
| 7606 | image_spec_value (img->spec, QCbackground, NULL); if (!STRINGP | 7603 | image_spec_value (img->spec, QCbackground, NULL); if (!STRINGP |
| 7607 | (specified_bg) | 7604 | (specified_bg). */ |
| 7608 | */ | ||
| 7609 | value = image_spec_value (img->spec, QCrotation, NULL); | 7605 | value = image_spec_value (img->spec, QCrotation, NULL); |
| 7610 | if (FLOATP (value)) | 7606 | if (FLOATP (value)) |
| 7611 | { | 7607 | { |
| @@ -7625,8 +7621,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7625 | } | 7621 | } |
| 7626 | 7622 | ||
| 7627 | /* Finaly we are done manipulating the image, figure out resulting | 7623 | /* Finaly we are done manipulating the image, figure out resulting |
| 7628 | width, height, and then transfer ownerwship to Emacs. | 7624 | width, height, and then transfer ownerwship to Emacs. */ |
| 7629 | */ | ||
| 7630 | height = MagickGetImageHeight (image_wand); | 7625 | height = MagickGetImageHeight (image_wand); |
| 7631 | width = MagickGetImageWidth (image_wand); | 7626 | width = MagickGetImageWidth (image_wand); |
| 7632 | if (status == MagickFalse) | 7627 | if (status == MagickFalse) |
| @@ -7643,7 +7638,6 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7643 | 7638 | ||
| 7644 | /* We can now get a valid pixel buffer from the imagemagick file, if all | 7639 | /* We can now get a valid pixel buffer from the imagemagick file, if all |
| 7645 | went ok. */ | 7640 | went ok. */ |
| 7646 | |||
| 7647 | 7641 | ||
| 7648 | init_color_table (); | 7642 | init_color_table (); |
| 7649 | imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type) | 7643 | imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type) |
| @@ -7660,8 +7654,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7660 | 7654 | ||
| 7661 | /* Copy imagegmagick image to x with primitive yet robust pixel | 7655 | /* Copy imagegmagick image to x with primitive yet robust pixel |
| 7662 | pusher loop. This has been tested a lot with many different | 7656 | pusher loop. This has been tested a lot with many different |
| 7663 | images. | 7657 | images. */ |
| 7664 | */ | ||
| 7665 | 7658 | ||
| 7666 | /* Copy pixels from the imagemagick image structure to the x image map. */ | 7659 | /* Copy pixels from the imagemagick image structure to the x image map. */ |
| 7667 | iterator = NewPixelIterator (image_wand); | 7660 | iterator = NewPixelIterator (image_wand); |