ok1 Posted November 26, 2006 Report Share Posted November 26, 2006 (edited) Piemēram man uz servera ir bilde - bildes/lielas/123.jpg Man vajadzētu viņai uzlikt watermark un saglabāt tur pat, ar tādu pašu nosaukumu. Internetā ir pilns ar skriptiem, kuri uzreiz parāda bildi (uzģenerē <img src="phpfails.php?src=123.jpg">), bet man vajag lai saglabātu. Nekur nevaru atrast. Mēģināju pats uzrakstīt, nesanāk. Un būtu labi, ja skripts atblastītu arī visus formātus (bmp,jpg,gif,png) Edited November 26, 2006 by ok1 Link to comment Share on other sites More sharing options...
Delfins Posted November 26, 2006 Report Share Posted November 26, 2006 (edited) a tu paņem to skriptu kas izvada, tikai beigās pieliec nevis šito imagejpeg($img); bet šito imagejpeg($img,$img_filename); Edited November 26, 2006 by Delfins Link to comment Share on other sites More sharing options...
ok1 Posted November 26, 2006 Author Report Share Posted November 26, 2006 (edited) Kaut kā nesanāk: http://paste.php.lv/4762 Edited November 26, 2006 by ok1 Link to comment Share on other sites More sharing options...
bubu Posted November 26, 2006 Report Share Posted November 26, 2006 A kļūdas paziņojumus nelasi? Tev semikolu tur par maz. Un wtf, ko tev 30 rinda dara? Tu tur par daudz bildes netaisi? Veselas trīs - 4, 77 rindā un vēl tajā switchā. Kāpēc? Tev nepietiek ar divām - parastā bilde un watermark bilde? Link to comment Share on other sites More sharing options...
ok1 Posted November 26, 2006 Author Report Share Posted November 26, 2006 (edited) 1) Man kļūdu paziņojumus nerāda (Kā ieslēgt?) 2) Tagad lapa veras, bet neredzu logo uz bildes, tikai bildi. Tagad : http://paste.php.lv/4764 Edited November 26, 2006 by ok1 Link to comment Share on other sites More sharing options...
Val Posted November 26, 2006 Report Share Posted November 26, 2006 error_reporting(E_ALL); Link to comment Share on other sites More sharing options...
ok1 Posted November 26, 2006 Author Report Share Posted November 26, 2006 error_reporting(E_ALL); ERRORUS nerādā. Dīvaini... Link to comment Share on other sites More sharing options...
andrisp Posted November 26, 2006 Report Share Posted November 26, 2006 Hmmm.. iespējams, ka vajag display_errors = On iekš php.ini Link to comment Share on other sites More sharing options...
bubu Posted November 26, 2006 Report Share Posted November 26, 2006 Kamoon, cilvēk tu saproti ko dari? Tev 31 rindā nav definēts $watermark mainīgais Papildus E_ALL vajag: ini_set("display_errors", "1"); Link to comment Share on other sites More sharing options...
ok1 Posted November 26, 2006 Author Report Share Posted November 26, 2006 Izdevās. Ja kādu interesē source, tad to var atrast : http://paste.php.lv/4767 Link to comment Share on other sites More sharing options...
Stopp Posted November 26, 2006 Report Share Posted November 26, 2006 Tev pie sviča nav tāda gadījuma, kad būtu BMP formāts, savukārt 46. rindiņā tas tiek pārbaudīts. Es tik tā, piekasos pie sīkumiem. Link to comment Share on other sites More sharing options...
andrisp Posted November 26, 2006 Report Share Posted November 26, 2006 Un vispār imagewbmp nav tas, ko ok1 domā, ka tas ir. Šī fja ir paredzēta wbmp formātam nevis bmp. - http://en.wikipedia.org/wiki/Wbmp Link to comment Share on other sites More sharing options...
bubu Posted November 26, 2006 Report Share Posted November 26, 2006 Ja gribi īstu bmp, tad vari paķert manu rakstīo bmp izvadi: http://paste.php.lv/4769 Lai gan nezinu, kuru mūsdienās var vēl bmp interesēt... Link to comment Share on other sites More sharing options...
Stopp Posted November 26, 2006 Report Share Posted November 26, 2006 Var interesēt. Kaut vai tas, ka dažas programmas (piem. Amazing Photo Editor) pēc bildes rediģēšanas izmet to bildi bmp formātā. Itkā ar jpg paplašinājumu, bet formāts bmp. Link to comment Share on other sites More sharing options...
bubu Posted November 26, 2006 Report Share Posted November 26, 2006 Es jau runāju, par php kodu, kurš izdod outputā bmp. Kuram tas ir vajadzīgs. Ar png un jpg nepietiek? Link to comment Share on other sites More sharing options...
Recommended Posts