Sponsored Content
Full Discussion: Changing Images in HTML
Top Forums Web Development Changing Images in HTML Post 302945328 by blackrageous on Thursday 28th of May 2015 10:41:42 AM
Old 05-28-2015
Jquery slide show (fades out/in images)....see...

Download Jssor Slider Free for website design

sample: Simple Fade Slideshow

supposedly free to download, no usage restrictions.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I extract text only from html file without HTML tag

I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part. Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer,... (4 Replies)
Discussion started by: los111
4 Replies

2. Web Development

html link to images in /tmp directory

Because of permission issues, I need to link to images in my web page which are stored in /tmp which of course is located in the root directory but my actual html page is much further down in another directory. I thought the the following code should work, but the image comes up as a broken link:... (2 Replies)
Discussion started by: Solerous
2 Replies

3. UNIX for Advanced & Expert Users

shellinabox/html help to insert a keypress with an html button

I am trying to use shellinabox as a terminal emulator. Everything is working except there seems to be no way to simulate an F14 button press in shellinabox. I am already embedding shellinabox in an html page so Im am wondering if there is a way to make an html/js button that will pass F14 to the... (0 Replies)
Discussion started by: syadnom
0 Replies

4. Shell Programming and Scripting

Referring to attached images in html email body through mailx

encoding type for images? (5 Replies)
Discussion started by: biswasbaishali
5 Replies

5. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

6. Shell Programming and Scripting

accepting images as a list and changing the name

Here is what I have so far #!/bin/bash while do read image jpegtopnm $image | pnmscale -height 200 | pnmtojpeg > $image-thumb echo $image-thumb shift done I sorta threw some pseudocode in there to demonstrate what I'm trying to do. . Where I am... (3 Replies)
Discussion started by: subway69
3 Replies

7. Shell Programming and Scripting

Removing all except couple of html tags from html file

I tried to find elegant (or at least simple) way to remove all but couple of html tags from html file, but all examples I found dealt with removing all the tags. The logic of the script would be: - if there is <li> or <ul> on the line, do nothing (=write same line to output) - if there is:... (0 Replies)
Discussion started by: juubuntu
0 Replies

8. UNIX for Advanced & Expert Users

Mutt for html body and multiple html & pdf attachments

Hi all: Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project. There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues. Running with... (1 Reply)
Discussion started by: raggmopp
1 Replies

9. Shell Programming and Scripting

Difficulty cleaning references to duplicated images in HTML code

Hi, I need to search and replace references to duplicated images in HTML code. There are several groups of duplicated images, which are visually the same, but with different filenames. I managed to find the duplicated files themselves, but now I need to clean the code too. I have a CSV file with... (9 Replies)
Discussion started by: mdart
9 Replies

10. Shell Programming and Scripting

Bash Script to find/sort/move images/duplicate images from USB drive

Ultimately, I'm looking to create a script that allows me to plug in a usb drive with lots of jpegs on it & copy them over to a folder on my hard drive. So in the process of copying I am looking to hash check them, record dupes to a file, copy only 1 of the identical files (if it doesn't exsist... (1 Reply)
Discussion started by: JonaQuinn
1 Replies
SDL::Tutorial::Images(3)				User Contributed Perl Documentation				  SDL::Tutorial::Images(3)

NAME
SDL::Tutorial::Images SYNOPSIS
# to read this tutorial $ perldoc SDL::Tutorial::Images # to create a demo animation program based on this tutorial $ perl -MSDL::Tutorial::Images=sdl_images.pl -e 1 ANIMATING IMAGES
Since you're already familiar with the concepts behind animation, it's time to learn how to work with images. As usual, the important point is that computer animation is just simulating motion by painting several slightly different frames to the screen every second. There are two ways to vary an image on screen. One is to change its coordinates so it's at a slightly different position. This is very easy to do; it's just like animating a rectangle. The other way is to change the image itself so it's slightly different. This is a little more difficult, as you'll need to draw the alternate image beforehand somehow. Loading Images As usual, start with an SDL::App object representing the image window. Then preload the image file. This is easy; just pass the "name" parameter to the SDL::Surface constructor: use SDL::Surface; my $frame = SDL::Surface->new( -name => 'frame1.png' ); Note: you'll need to have compiled SDL Perl (and probably SDL) to support JPEG and PNG files for this to work. That's it; now you have an SDL::Surface object containing the image. You can use the "height()", "width()", and "bpp()" methods to retrieve its height, width, and bits per pixel, if you need them. Displaying Images Drawing an image onto the screen requires blitting it from one surface to another. (Remember, "blitting" means copying bits in memory.) The "blit()" method of SDL::Surface objects comes in handy. Its arguments are a little odd, though. Assuming $app is the SDL::App object, as usual: use SDL::Rect; my $frame_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); my $dest_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); Here we have two SDL::Rect objects which represent rectangular regions of a Surface. $frame_rect represents the entire area of $frame, while $dest_rect represents the area of the main window in which to blit the frame. This may be clearer with more descriptive variable names: $source_surface->blit( $area_of_source_to_blit, $destination_surface, $destination_area ); As usual, call "update()" on $app to see the change. Requiring the source and destination Rect objects may seem tedious in this simple example, but it's highly useful for copying only part of surface to part of another. For example, animating this image is a matter of changing the "x" and "y" coordinates of $dest_rect: for my $x ( 1 .. 100 ) { $dest_rect->x( $x ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); } Of course, you'll have to redraw all or part of the screen to avoid artifacts, as discussed in the previous tutorial. Multi-Image Animation That covers moving a single image around the screen. What if you want something more? For example, what if you want to animate a stick figure walking? You'll need several frames, just as in a flip-book. Each frame should be slightly different than the one before it. It's probably handy to encapsulate all of this in a "Walker" class: package Walker; use SDL::Surface; sub new { my ($class, @images) = @_; my $self = [ map { SDL::Surface->new( -name => $_ ) } @images ]; bless $self, $class; } sub next_frame { my $self = shift; my $frame = shift @$self; push @$self, $frame; return $frame; } To use this class, instantiate an object: my $walker = Walker->new( 'frame1.png', 'frame2.png', 'frame3.png' ); Then call "next_frame()" within the loop: for my $x ( 1 .. 100 ) { my $frame = $walker->next_frame(); $dest_rect->x( $x ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); } Again, the rest of the frame drawing is missing from this example so as not to distract from this technique. You'll probably want to abstract the undrawing and redrawing into a separate subroutine so you don't have to worry about it every time. It'd be easy to make "next_frame()" much smarter, selecting an image appropriate to the direction of travel, using a bored animation when the character is no longer moving, or adding other characteristics to the character. As you can see, the hard part of this technique is generating the images beforehand. That can add up to a tremendous amount of art and that's one reason for the popularity of 3D models... but that's another tutorial much further down the road. More importantly, it's time to discuss how to make these animations run more smoothly. More on that next time. SEE ALSO
SDL::Tutorial basic SDL tutorial SDL::Tutorial::Animation non-image animation AUTHOR
chromatic, <chromatic@wgz.org> Written for and maintained by the Perl SDL project, <http://sdl.perl.org/>. BUGS
No known bugs. COPYRIGHT
Copyright (c) 2004, chromatic. All rights reserved. This module is distributed under the same terms as Perl itself, in the hope that it is useful but certainly under no guarantee. perl v5.12.1 2010-07-05 SDL::Tutorial::Images(3)
All times are GMT -4. The time now is 10:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy