TP Underground Lounge 07/08
-


Hinweise


Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten
Alt 08.06.2002, 16:36   #1
TP-Member
 
Benutzerbild von Korny
 
Registriert seit: Mar 2001
Ort: Harpstedt
Korny macht alles soweit korrekt
Angry

Bilderproblem mit PHP


Hallo zusammen,

ich möchte mit PHP Bilder erzeugen. Vielmehr will ich aus verschiedenen Schnitteilen (immer das gleiche Foto mit verschiedenen Farben) ein Bild zusammensetzen, welches den bisher zusammengestellten Artikel mit Originalfarben zeigt.
Nun das Problem: Egal ob ich PNG oder JPG nehme, die
Qualität ist grausam. Wie kann man das verbessern? Was mach ich falsch?
Müssen die Vorlagen ein bestimmtes Format haben (eine best. Farbtiefe...)?

Wäre dankbar fuer jeden Vorschlag.

Danke
Marc
__________________
WebWorker Bremen
http://www.webworker-bremen.de
Korny ist offline   Mit Zitat antworten


Alt 08.06.2002, 17:40   #2
TP-Veteran
 
Benutzerbild von holunda
 
Registriert seit: Oct 2001
Ort: Oberau
holunda macht alles soweit korrekt
link/codeschnippsel wäre günstig - . . . > Dann wird iHnen geholfen
__________________
Gruß vom holu
holunda ist offline   Mit Zitat antworten
Alt 08.06.2002, 17:49   #3
TP-Member
 
Benutzerbild von Korny
 
Registriert seit: Mar 2001
Ort: Harpstedt
Korny macht alles soweit korrekt

Codeschnipsel


Ok, dann bin ich mal gespannt ;-)

header("Content-type: image/jpeg");
$image = imagecreatefrompng("images/anzug/Xenon/vorlage.png");
$farben = $anzug->getFarbe();

if($farben){

$bild = "images/anzug/Xenon/oberteil/".replace($farben[0]).".jpg";
$image1 = imagecreatefromjpeg($bild);
ImageCopy($image,$image1,80,40,80,40,100,50);

$bild = "images/anzug/Xenon/unterteil/".replace($farben[1]).".jpg";
$image1 = imagecreatefromjpeg($bild);
ImageCopy($image,$image1,90,136,90,136,60,40);
}else{
$image = imagecreatefromjpeg("standard.jpg");
}

imagejpeg($image);
//imagepng($image,"konfiguration.png");
imagedestroy($image);
imagedestroy($image1);

Danke
Marc
__________________
WebWorker Bremen
http://www.webworker-bremen.de
Korny ist offline   Mit Zitat antworten
Alt 08.06.2002, 19:47   #4
TP-Greis
 
Benutzerbild von Lars
 
Registriert seit: Jun 2001
Ort: Bonn-Altstadt
Lars bringt sich richtig ein
In welcher Hinsicht ist denn die Qualität schlecht? Sind die Bilder pixelig?
__________________
Give up yourself into the moment — The time is now.
Lars ist offline   Mit Zitat antworten
Alt 08.06.2002, 19:51   #5
TP-Supporter
 
Benutzerbild von Howie Munson II
 
Registriert seit: May 2001
Ort: Berlin
Howie Munson II macht alles soweit korrekt
Vielleicht hilft das weiter :

Zitat:
I've noticed a couple of things with the ImageCreateFromPng function that
may be useful if your having problems.

1st thing I noticed is that the PNG file you are creating from needs to be
indexed and less than 256 colors.

Secondly, you need to reduce the color depth by 1 for each color you plan
on generating in php... I.E. if you plan on drawing 50 different colors
on the screen with php you need to allocate space for them by reducing the
origional image's color depth to 205 colors (I was pulling my hair out on
this one for a while because the wrong colors were showing up in the
output).

Also, if you are saving the image as a PNG you need to allocate the 1st
color as white.. The reason for this is that Internet Explorer seems to
interpret the first color in an indexed PNG as white no matter what color
it is... (Figured this out when all my pretty black text was turning up as
white in I.E. and was normal in Netscape; allocated the first color in the
image as white and the problem went away.)
noch ein paar mehr Kommentare gibt es hier
Howie Munson II ist offline   Mit Zitat antworten
Alt 08.06.2002, 20:03   #6
TP-Member
 
Benutzerbild von Korny
 
Registriert seit: Mar 2001
Ort: Harpstedt
Korny macht alles soweit korrekt
Hi,

@ Schmobi:
- png:Bilder haben zu wenig Farben
- jpg: Bilderhaben zu schlechte Qualität, sind zu verschwommen.

@ Howie Munson II:
Danke, ich werde mir mal einen Dolmetscher suchen ;-)
Naja so schlimm wird es wohl nicht werden. Klingt auf den ersten Blick ganz gut. Danke

Marc
__________________
WebWorker Bremen
http://www.webworker-bremen.de
Korny ist offline   Mit Zitat antworten
Alt 09.06.2002, 13:20   #7
TP-Insider
 
Benutzerbild von TobiasKa
 
Registriert seit: Feb 2002
Ort: Burgkichen (Austria)
TobiasKa ist auf einem guten Weg

Testest du es Local


Hi,
Wenn ich meine Bild-Scripte "local" (am eigenen PC) teste, sehen sie auch schlecht aus.
Aber bei mir auf dem Server ist´s dann wunderbar.

Also: teste es mal auf einem Server, op´s da klappt.

Noch eine Frage, wenn wir grad bei dem Thema sind:

Kann man irgentwie eine ANTI-ALIAS Funktion einstellen? (ich hab nämlich den eindruck, dass da einfach nur Pixel weggelassen werden)

Gruß
Tobias
TobiasKa ist offline   Mit Zitat antworten
Antwort

  Aktuelles Thema
  TP Hilfe Forum > Web-Editoren & Coding > Traum-Dynamik
Bilderproblem mit PHP Bilderproblem mit PHP
« Datei schützen .htaccess | Flash Formular (puretec) mit PHP Datei (tripod) - funzt nicht - »

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 08:59 Uhr.

Powered by: vBulletin Version 3.7 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. / Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Traum-Projekt.com | Suchen | Archiv | Impressum | Kontakt | | | Nach oben |



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67