Risultati da 1 a 9 di 9
-
24-12-2013, 17:27 #1
- Data Registrazione
- Jun 2011
- Località
- Ferrara
- Età
- 47
- Messaggi
- 34
Problema con plugin "Image Watermarker"
Ciao a tutti, sul mio vBulletin 3.8.4 ho da anni installato il plugin Image Watermarker anche se non è stato mai utilizzato. Ora ho iniziato inserendo un logo in un file png pulito. Purtroppo molte delle immagini allegate sono falsate. Provo ad allegare un'immagine corretta con il logo perfetto ed un altro paio con gli errori di visualizzazione.
Da cosa può dipendere? Ho provato a cambiare logo ma il problema rimane.
Purtroppo non mi aiuterà più nessuno su vBulletin.org, ho una versione di forum troppo vecchia mi sa...
Grazie se potrete aiutarmi a capire come risolvere questo problema...
-
24-12-2013, 18:56 #2
Io temo che il timeout del server sia troppo "stretto" e così non fa in tempo di aggiungere il watermark. Questo problema si verifica ancora più pesante quando le immagini sono salvati nel database.
Giovanni
http://www.trimelli.com/
Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.
-
24-12-2013, 21:04 #3
- Data Registrazione
- Jun 2011
- Località
- Ferrara
- Età
- 47
- Messaggi
- 34
Grazie Giovanni, sei sempre tu il mio salvatore
Se così fosse la vedo molto grigia, in quanto non si tratta nemmeno di file pesante per il logo, dato che è di appena 4Kb ...
Ho provato anche ad installare "Watermark Generator" nonostante fosse per la versione 4.0 . Si installa, si configura perfettamente nel pannello di amministrazione ma purtroppo non va e non mostra il watermark negli allegati.
http://www.vbulletin.org/forum/showt...ight=watermark
Secondo te si può riuscire a far funzionare agendo sui suoi plugin ?
-
25-12-2013, 19:10 #4
- Data Registrazione
- Jun 2011
- Località
- Ferrara
- Età
- 47
- Messaggi
- 34
Forse ho capito da solo il problema. Nelle due immagini allegate, la prima è salvata direttamente da un sito internet (quindi jpg originale) e postandola sul mio forum il watermark risulta falsato. La seconda l'ho prima salvata mediante strumento di cattura (quindi jpeg realizzato da software) e postandola il watermark è perfetto.
Quindi posso affermare che il problema deriva dal tipo di compressione dei files caricati.
Ora...inserendo qui il plugin originale, secondo te è possibile modificare qualcosa per arginare questo problema? Io ne so meno di zero di programmazione...
Ecco il plugin...
Codice:// begin variables // the path to the PNG file that you want to overlay with // must be on the local machine, not an http:// URL $WATERMARK_PNG_FILE = '/home/real9bdb/public_html/instr/PROVALOGO3.png'; // how you want to position the watermark enter either center or bottom_left $WATERMARK_POSITION = 'bottom_left'; // user you want to see watermarking on - this is just for testing // set to 0 to work for all users $VB_USER_ID = 0; // end variables - you shouldn't need to edit below here // if there's no filepath to work with there's nothing we can do // we also need the watermark file to exist // if $VB_USER_ID is specified (for testing) show it just them if(! empty($attachpath) && file_exists($WATERMARK_PNG_FILE) && ( $VB_USER_ID == 0 || $GLOBALS['vbulletin']->userinfo['userid'] == $VB_USER_ID )) { // derive output name $fo = preg_replace('/\.attach$/', '.marked', $attachpath); // image doesn't exist or thumbnail is newer than the cached file - create a watermarked version if( (! file_exists($fo) || filemtime($WATERMARK_PNG_FILE) > filemtime($fo) || true) && $fo != $attachpath ) { // decide what image type it is if( preg_match('/\.png$/i', $attachmentinfo['filename']) ) { $im = @imagecreatefrompng($attachpath); } elseif( preg_match('/\.jpg$/i', $attachmentinfo['filename']) ) { $im = @imagecreatefromjpeg($attachpath); // create an empty truecolor container $tempimage = @imagecreatetruecolor(@imagesx($im), @imagesy($im)); // copy the 8-bit gif into the truecolor image @imagecopy($tempimage, $im, 0, 0, 0, 0, @imagesx($im), @imagesy($im) ); // copy the source_id int $im = $tempimage; } // open the watermark image $wm = @imagecreatefrompng($WATERMARK_PNG_FILE); @imagealphablending($wm, false); @imagesavealpha($wm, true); // catch opening problems if($im && $wm) { if($WATERMARK_POSITION == 'center') { $pos_x = (imagesx($im) / 2) - (imagesx($wm) / 2); $pos_y = (imagesy($im) / 2) - (imagesy($wm) / 2); } else { $pos_x = imagesx($im) - imagesx($wm) - 10; $pos_y = imagesy($im) - imagesy($wm) - 10; } // merge the files together $copy_worked = @imagecopy($im,$wm, $pos_x, $pos_y, 0, 0, imagesx($wm), imagesy($wm) ); } // write out the new image if($copy_worked) { // decide what image type it is if( preg_match('/\.png$/i', $attachmentinfo['filename']) ) { @imagepng($im,$fo); } elseif( preg_match('/\.jpg$/i', $attachmentinfo['filename']) ) { @imagejpeg($im,$fo); } elseif( preg_match('/\.gif$/i', $attachmentinfo['filename']) ) { @imagegif($im,$fo); } } } // check that the new file is there - if so open the file pointer to it if( @filesize($fo) > 0 && $fp2 = fopen($fo,'rb') ) { // re-send image size header header('Content-Length: '. filesize($fo)); @fclose($fp); $fp = $fp2; } }
-
26-12-2013, 15:42 #5
Omamma ... La testa. Siamo sotto le feste. Zero attività
Giovanni
http://www.trimelli.com/
Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.
-
26-12-2013, 21:40 #6
- Data Registrazione
- Jun 2011
- Località
- Ferrara
- Età
- 47
- Messaggi
- 34
Ma ci mancherebbe altro...poi essendo di Bologna posso tranquillamente immaginare cosa e quanto avrai mangiato in questi giorni !!!
Se e quando vorrai, con tutta la calma del mondo...prova ad esaminare il mio plugin con le indicazioni sul problema da me rilevate!
Grazie e buone feste naturalmente!
-
27-12-2013, 15:10 #7
Ho dato un'occhiata ora e mi sembra tutto apposto. Non c'è nessuna modifica che potrebbe snellire qualcosa.
Giovanni
http://www.trimelli.com/
Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.
-
27-12-2013, 22:13 #8
- Data Registrazione
- Jun 2011
- Località
- Ferrara
- Età
- 47
- Messaggi
- 34
Grazie!
Io da supermegaiperignorante avevo qualche sospetto su questa parte
Codice:// create an empty truecolor container
Ma se tu mi dici che per te è tutto ok...mi fido ciecamente!
-
28-12-2013, 11:32 #9
Quello lo crea per copiaree prima l'immagine e poi sovrappone il watermark con alfa-blending. Potrebbe creare problemi con immagini molto grandi ma allora non dovresti neanche vedere la pagina.
Giovanni
http://www.trimelli.com/
Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.
Discussioni Simili
-
vBulletin 3.8.x diminuire la dimensione delle tabelle "picture" e "attachment" del database
Di tryp nel forum VBulletin 3Risposte: 2Ultimo Messaggio: 27-05-2010, 17:27 -
Problema mailing list dopo "merge" di due database!
Di Scheggia nel forum Come faccioRisposte: 3Ultimo Messaggio: 27-04-2010, 15:18 -
vBulletin 3.7.x Forum "legati" e "condivisi"
Di viking-redominius nel forum VBulletin 3Risposte: 5Ultimo Messaggio: 02-04-2009, 18:22 -
vBulletin 3.6.x "Nuovi Messaggi" e "Cerca" non funzionanti
Di Neyla nel forum VBulletin 3Risposte: 13Ultimo Messaggio: 24-02-2008, 14:03 -
vBulletin 3.6.x Pulsante "Nuova discussione" accanto a "rispondi"
Di cionfs nel forum VBulletin 3Risposte: 2Ultimo Messaggio: 04-07-2007, 21:48
Segnalibri