Saving Images..

Reply

Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Saving Images..

 
0
  #1
Oct 1st, 2008
Hello Every Body

I Am Using PHP AND JAVASCRIPT

i am using two images on my page
at run time
1. first i drag one image on another
2. after that i write some text using a prompt box which is written on the dragged image at run time
3. Now at run time i want to save this final image which looks like above file

can any one Help Me
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Saving Images..

 
0
  #2
Oct 6th, 2008
hello,
can anybody help me on this please?????
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Saving Images..

 
0
  #3
Oct 7th, 2008
please get me some information...
please.....
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: Saving Images..

 
0
  #4
Oct 7th, 2008
Originally Posted by Shanti Chepuru View Post
please get me some information...
please.....
Do you have something put together online so that we can look at it? I'm just not exactly sure if I know exactly what you are talking about.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Saving Images..

 
0
  #5
Oct 7th, 2008
this is my code...
i can't get what i want to try:
please help me:
  1. <?php
  2. if($_SERVER['REQUEST_METHOD']=='POST' ){
  3. header('Content-type: image/jpeg');
  4. $tube = imagecreatefromgif("themes/New Folder/imgb3.gif");
  5. $gold = imagecreatefromjpeg("images/myimage.jpg");
  6. //$code = imagecreatefromgif("images/ICMcode.gif");
  7. imagecopy($tube, $gold, 75, 50, 0, 0, 75, 100);
  8. //imagecopymerge($tube, $gold, 200, 15, 0, 0, 200, 200, 100);
  9. //imagecopymerge($tube, $gold, 135, 15, 0, 0, 200, 200, 100);
  10. //imagecopymerge($tube, $code, 100, 10, 0, 0, 200, 200, 30);
  11. //imagecopymerge($tube, $code, 200, 10, 0, 0, 200, 200, 30);
  12. //imagecopymerge($tube, $code, 150, 10, 0, 0, 200, 200, 100);
  13. imagejpeg($tube);echo $tube;
  14. imagedestroy($tube);
  15. imagedestroy($gold);
  16. imagedestroy($code);
  17. }
  18. ?>
  19. <html>
  20. <head>
  21. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  22. <title>Untitled Document</title>
  23. <script language="JavaScript">
  24.  
  25. /*
  26.  
  27. INFORMATION:
  28. ============
  29.  
  30. Copyright 2001 by CodeFoot.com
  31. Free for all users, but leave in this notice
  32.  
  33. For IE4.X and later; degrades gracefully.
  34.  
  35. INSTRUCTIONS:
  36. =============
  37.  
  38. Step One:
  39. ---------
  40.  
  41. Place this script in the head of the page.
  42. Set the six dimensioning variables where
  43. shown in the script (below).
  44.  
  45. Step Two:
  46. ---------
  47.  
  48. In the body, give each image a unique name
  49. and attach the functions as shown:
  50.  
  51. <img src="someimage.jpg"name="imageOne"width="100" height="100"onDrag="dragResizeImage(event,this.name)"
  52. onClick="clickResetImageSize(this.name)">
  53.  
  54. <img src="anotherimage.jpg"
  55. name="imageTwo"
  56. width="100" height="100"
  57. onDrag="dragResizeImage(event,this.name)"
  58. onClick="clickResetImageSize(this.name)">
  59.  
  60. Any number of images may be used; however,
  61. all should usually be the same default size.
  62.  
  63. Step Three:
  64. -----------
  65.  
  66. Add the iBeReady variable to an onload event
  67. in the body tag:
  68.  
  69. <body onload="iBeReady=true;">
  70.  
  71. */
  72.  
  73. // THE SCRIPT:
  74. // ===========
  75.  
  76. // sets the default size of the image(s)
  77. defaultXsize = 100;
  78. defaultYsize = 100;
  79.  
  80. // sets the minimum size of the image(s)
  81. minimumXsize = 50;
  82. minimumYsize = 50;
  83.  
  84. // sets the maximum size of the image(s)
  85. maximumXsize = 250;
  86. maximumYsize = 250;
  87.  
  88. // Do not edit below this line.
  89. // ----------------------------
  90.  
  91. iBeReady = false;
  92.  
  93. function dragResizeImage(dragEvent,which){
  94. alert(which);
  95. if (iBeReady){
  96. posX = eval("document."+which+".offsetLeft");
  97. posY = eval("document."+which+".offsetTop");
  98. newXsize = dragEvent.x;
  99. newYsize = dragEvent.y;
  100. newXsize = newXsize - posX;
  101. newYsize = newYsize - posY;
  102. if (newXsize >= maximumXsize) newXsize = maximumXsize;
  103. if (newYsize >= maximumYsize) newYsize = maximumYsize;
  104. if (newXsize <= minimumXsize) newXsize = minimumXsize;
  105. if (newYsize <= minimumYsize) newYsize = minimumYsize;
  106. eval("document."+which+".width=newXsize");
  107. eval("document."+which+".height=newYsize");
  108. }
  109. }
  110.  
  111. function clickResetImageSize(which){
  112. if (iBeReady){
  113. eval("document."+which+".width=defaultXsize");
  114. eval("document."+which+".height=defaultYsize");
  115. }
  116. }
  117.  
  118. function frame(id){
  119. document.getElementById("div1").setAttribute("background","themes/New Folder/imgb"+id+".gif");
  120. }
  121. function frame_image(id){
  122. document.getElementById("div2").setAttribute("src","images/img"+id+".jpg");
  123. }
  124.  
  125.  
  126. </script>
  127. <style type="text/css">
  128.  
  129. .drag{
  130. position:relative;
  131. cursor:hand;
  132. z-index: 100;
  133. }
  134.  
  135. </style>
  136. <script type="text/javascript">
  137.  
  138. /***********************************************
  139. * Drag and Drop Script: © Dynamic Drive (http://www.dynamicdrive.com)
  140. * This notice MUST stay intact for legal use
  141. * Visit http://www.dynamicdrive.com/ for this script and 100s more.
  142. ***********************************************/
  143.  
  144. var dragobject={
  145. z: 0, x: 0, y: 0, offsetx : null, offsety : null, targetobj : null, dragapproved : 0,
  146. initialize:function(){
  147. document.onmousedown=this.drag
  148. document.onmouseup=function(){this.dragapproved=0}
  149. },
  150. drag:function(e){
  151. var evtobj=window.event? window.event : e
  152. this.targetobj=window.event? event.srcElement : e.target
  153. if (this.targetobj.className=="drag"){
  154. this.dragapproved=1
  155. if (isNaN(parseInt(this.targetobj.style.left))){this.targetobj.style.left=0}
  156. if (isNaN(parseInt(this.targetobj.style.top))){this.targetobj.style.top=0}
  157. this.offsetx=parseInt(this.targetobj.style.left)
  158. this.offsety=parseInt(this.targetobj.style.top)
  159. this.x=evtobj.clientX
  160. this.y=evtobj.clientY
  161. if (evtobj.preventDefault)
  162. evtobj.preventDefault()
  163. document.onmousemove=dragobject.moveit
  164. }
  165. },
  166. moveit:function(e){
  167. var evtobj=window.event? window.event : e
  168. if (this.dragapproved==1){
  169.  
  170. this.targetobj.style.left=this.offsetx+evtobj.clientX-this.x+"px"
  171. this.targetobj.style.top=this.offsety+evtobj.clientY-this.y+"px"
  172. return false
  173. }
  174. }
  175. }
  176.  
  177. dragobject.initialize()
  178.  
  179. </script>
  180. <style type="text/css">
  181. <!--
  182. #Layer1 {
  183. position:absolute;
  184. left:138px;
  185. top:205px;
  186. width:23px;
  187. float:inherit;
  188. height:190px;
  189. z-index:100;
  190. }
  191. #layer2 {
  192. position:absolute;
  193. left:138px;
  194. top:205px;
  195. width:23px;
  196. height:190px;
  197. z-index:1;
  198. }
  199. #Layer2 {
  200. position:absolute;
  201. left:322px;
  202. top:685px;
  203. width:269px;
  204. height:262px;
  205. z-index:2;
  206. }
  207. -->
  208. </style>
  209. <!--shanti functions-->
  210. </head>
  211. <body onLoad="iBeReady=true;">
  212. <form name="form1" action="" method="post" onSubmit="return shanti();">
  213. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  214. <tr>
  215. <td>&nbsp;</td>
  216. </tr>
  217. <tr>
  218. <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  219. <tr>
  220. <td><table width="0%" border="0" cellspacing="0" cellpadding="0">
  221. <tr>
  222. <td>&nbsp;</td>
  223. <td><img src="images/img3.jpg" width="75" height="100" name="image1" onClick="frame_image(1)"></td>
  224. <td>&nbsp;</td>
  225. <td><img src="images/img2.jpg" width="75" height="100"name="image2" onClick="frame_image(2)"></td>
  226. <td>&nbsp;</td>
  227. <td><img src="images/img4.jpg" width="75" height="100" class="drag" name="image2113" onDrag="dragResizeImage(event,this.name)" onClick="frame_image(3)"></td>
  228. <td>&nbsp;</td>
  229. <td><img src="images/img6.jpg" width="75" height="100" name="image3" onClick="frame_image(4)"></td>
  230. </tr>
  231. </table></td>
  232. </tr>
  233. </table></td>
  234. </tr>
  235. <tr>
  236. <td>&nbsp;</td>
  237. </tr>
  238. <tr>
  239. <td align="center"><table width="95%" border="0" align="right" cellpadding="0" cellspacing="0">
  240. <tr>
  241. <td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  242. <tr>
  243. <td bgcolor="#F5F3F6"><img src="fiji-html/fiji-html/images/spacer.gif" width="1" height="1"></td>
  244. </tr>
  245. <tr>
  246. <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
  247. <tr>
  248. <td><img src="themes/New Folder/newfeats.jpg" width="55" height="55"></td>
  249. <td><p style="text-align: justify;">We have added a designer canvas for your creative outlet</p>
  250. <p style="text-align: justify;">You can place a photo, add designer borders, spice up with some designs, and customize with your personal text and/or choose from a bunch of our pre-formatted texts for any occassion !!</p></td>
  251. </tr>
  252. </table></td>
  253. </tr>
  254. <tr>
  255. <td bgcolor="#F5F5F7"><img src="fiji-html/fiji-html/images/spacer.gif" width="1" height="1"></td>
  256. </tr>
  257. <tr>
  258. <td><table width="0%" border="0" align="center" cellpadding="0" cellspacing="0">
  259. <tr>
  260. <td width="150"><img src="themes/New Folder/ts_bg.jpg" width="150" height="250"></td>
  261. <td width="260" background="themes/New Folder/tshirt_bg.jpg " id="div1" >
  262. <img src="themes/New Folder/tshirt_bg.jpg" name="div2" width="110" height="75" class="drag" id="div2" onClick="return doSomething(this);">
  263. </td>
  264. </tr>
  265. </table></td>
  266. </tr>
  267. </table></td>
  268. <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  269. <tr>
  270. <td><table border="0" cellspacing="0" cellpadding="6">
  271. <tr>
  272. <td width="50" align="center" bgcolor="#F6F6F8">Borders</td>
  273. <td align="center">&nbsp;</td>
  274. <td width="50" align="center" bgcolor="#FBFBFD">Text</td>
  275. </tr>
  276. </table></td>
  277. </tr>
  278. <tr>
  279. <td><table width="100%" border="1" cellpadding="8" cellspacing="0" bordercolor="#C0BDBC">
  280. <tr>
  281. <td><img src="themes/New Folder/img1.gif" width="86" height="80" onClick="frame(1)"></td>
  282. <td><img src="themes/New Folder/img2.gif" width="79" height="80"onClick="frame(2)"></td>
  283. </tr>
  284. <tr>
  285. <td><img src="themes/New Folder/img3.gif" width="80" height="80"onClick="frame(3)"></td>
  286. <td><img src="themes/New Folder/img4.gif" width="80" height="80"onClick="frame(4)"></td>
  287. </tr>
  288. <tr>
  289. <td><img src="themes/New Folder/C080_bg_11_web.gif" width="80" height="80"></td>
  290. <td><img src="themes/New Folder/C080_bg_15_web.gif" width="80" height="80"></td>
  291. </tr>
  292. </table></td>
  293. </tr>
  294. </table> </td>
  295. </tr>
  296. <tr>
  297. <td align="center"><label>
  298. <input type="submit" name="Submit" value="Submit">
  299. </label></td>
  300. <td>&nbsp;</td>
  301. </tr>
  302. </table></td>
  303. </tr>
  304. <tr>
  305. <td>&nbsp;</td>
  306. </tr>
  307. <tr>
  308. <td>&nbsp;</td>
  309. </tr>
  310. </table>
  311. </form>
  312. </body>
  313. </html>
Last edited by Shanti Chepuru; Oct 7th, 2008 at 4:15 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC