andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


Upload Image to Mask Instead?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Image Mask
View previous topic :: View next topic  
Author Message
dragus
Newbie


Joined: 03 Mar 2004
Posts: 1

PostPosted: Wed Mar 03, 2004 4:10 pm    Post subject: Upload Image to Mask Instead? Reply with quote

Is it possible or do you know any scripts that utilizes this image mask but it allows the user to upload their own image to mask?
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Thu Mar 04, 2004 9:01 am    Post subject: Reply with quote

hi Dragus, and welcome to the board!

It's totally possible. The class itself is set up to be the 'grunt work' behind masking an image, and was designed so that it would be easy to drop into any of your own code.

In pseudo code, this is what you'll need to do (and you can find examples of doing all of this online in a lot of different places):

Code:
if (form has been submitted) {
    if (uploaded image is valid) {
        require 'image masking class'
        create image mask instance
        apply mask to uploaded image
        save image
        remove uploaded temp file
    } else {
        give error
    }
} else {
    display form
}


Pretty simply, yeah? Try to create the code yourself, and if you get stuck then post back up and I'll try to help you out some more.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Image Mask All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group