Autor Zpráva
kachnak
Profil
Zdravím,
mám taký problém po dvoch rokoch na webke, jeden nový užívateľ pri nahrávaní fotiek JPG ako keby mal zlý formát obrázkov JPG, pretože keď ďalej vytváram zmenšeniny z originálneho obrázku, vytvorí my iba čierne obdĺžniky.
Dá sa nejak zistiť či nemôže mať napr PNG obrázky a len ich natvrdo premenoval na JPG? alebo neviete čím to môže byť?
Vďaka

toto je jedna z fotiek, ktorá robí problémy:
http://euroscene.net/profily/1/up/P5KHMQOS53org.jpg

používam tieto funkcie:
$thumb=imagecreatetruecolor($width2, $height2);
$source=imagecreatefromjpeg($name);
imagecopyresampled($thumb, $source, 0, 0, 0, 0, $width2, $height2, $width, $height);
imagejpeg($thumb,"$menox",80);
imagedestroy($thumb);
PPs
Profil *
JPG môže byť v istej jednotke(neviem práve jej názov) 24, alebo 32. Keď je 32, práve vtedy robí tento problém. S riešením Ti, ale neporadím, osobne sa s tým stretávam dosť výnimočne, rýchlejšie je to manuálne zmeniť.
Joker
Profil
PPs:
JPG môže byť v istej jednotke(neviem práve jej názov) 24, alebo 32.
To bude nejspíš barevná hloubka (24 nebo 32 bpp = bits per pixel = bitů na pixel)
juriad
Profil
podle
identify -verbose P5KHMQOS53org.jpg :
Image: P5KHMQOS53org.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 2560x1920+0+0
  Resolution: 72x72
  Print size: 35.5556x26.6667
  Units: PixelsPerInch
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 123.772 (0.485382)
      standard deviation: 86.6318 (0.339733)
      kurtosis: -1.3366
      skewness: 0.558771
    Green:
      min: 8 (0.0313725)
      max: 255 (1)
      mean: 127.023 (0.498129)
      standard deviation: 85.8928 (0.336835)
      kurtosis: -1.38648
      skewness: 0.507311
    Blue:
      min: 9 (0.0352941)
      max: 255 (1)
      mean: 132.586 (0.519944)
      standard deviation: 83.237 (0.32642)
      kurtosis: -1.42155
      skewness: 0.451771
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 127.794 (0.501152)
      standard deviation: 85.2664 (0.334378)
      kurtosis: -1.37834
      skewness: 0.504024
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Interlace: None
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 2560x1920+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: RightTop
  Properties:
    date:create: 2012-08-31T11:10:02+02:00
    date:modify: 2012-08-31T11:10:02+02:00
    exif:ApertureValue: 281/100
    exif:BrightnessValue: 506/100
    exif:ColorSpace: 1
    exif:ComponentsConfiguration: 1, 2, 3, 0
    exif:Compression: 6
    exif:Contrast: 0
    exif:DateTime: 2012:03:03 16:50:20
    exif:DateTimeDigitized: 2012:03:03 16:50:20
    exif:DateTimeOriginal: 2012:03:03 16:50:20
    exif:DigitalZoomRatio: 0/0
    exif:ExifImageLength: 1920
    exif:ExifImageWidth: 2560
    exif:ExifOffset: 250
    exif:ExifVersion: 48, 50, 50, 48
    exif:ExposureBiasValue: 0/100
    exif:ExposureMode: 0
    exif:ExposureProgram: 2
    exif:ExposureTime: 1024/72704
    exif:Flash: 16
    exif:FlashPixVersion: 48, 49, 48, 48
    exif:FNumber: 2702/1024
    exif:FocalLength: 379/100
    exif:FocalLengthIn35mmFilm: 0
    exif:ImageDescription: SAMSUNG            
    exif:InteroperabilityIndex: R98
    exif:InteroperabilityOffset: 966
    exif:InteroperabilityVersion: 48, 49, 48, 48
    exif:ISOSpeedRatings: 50
    exif:JPEGInterchangeFormat: 1108
    exif:JPEGInterchangeFormatLength: 9013
    exif:LightSource: 0
    exif:Make: SAMSUNG            
    exif:MakerNote: 5, 11, 7, 43, 65, 76, 65, 87, 66, 76, 79, 71, 112, 0, 56, 234, 1, 0, 0, 0, 1, 0, 155, 64, 1, 0, 48, 62, 2, 0, 246, 173, 254, 255, 217, 19, 0, 0, 219, 186, 255, 255, 250, 164, 1, 0, 43, 160, 255, 255, 226, 239, 255, 255, 154, 105, 255, 255, 132, 166, 1, 0, 124, 79, 0, 0, 220, 81, 0, 0, 128, 79, 0, 0, 64, 82, 0, 0, 1, 1, 19, 0, 217, 18, 6, 0, 0, 25, 80, 101, 0, 0, 0, 0, 217, 18, 6, 0, 0, 0, 4, 0, 128, 235, 0, 0, 0, 0, 1, 0, 0, 244, 0, 0, 7, 2, 119, 2, 52, 2, 150, 2, 78, 9, 179, 231, 65, 70, 76, 73, 66, 76, 79, 71, 12, 0, 1, 0, 0, 0, 2, 1, 0, 0, 176, 2, 2, 0, 65, 69, 68, 66, 71, 76, 79, 71, 44, 0, 6, 0, 2, 0, 1, 0, 0, 1, 0, 72, 3, 0, 2, 25, 1, 94, 2, 153, 2, 184, 1, 25, 1, 250, 1, 34, 2, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 12, 255, 255, 255, 255, 255, 255
    exif:MaxApertureValue: 281/100
    exif:MeteringMode: 2
    exif:Model: GT-S8500
    exif:Orientation: 6
    exif:ResolutionUnit: 2
    exif:Saturation: 0
    exif:SceneCaptureType: 0
    exif:SceneType: 1
    exif:SensingMethod: 2
    exif:Sharpness: 0
    exif:ShutterSpeedValue: 615/100
    exif:Software: fw 05.11 prm 07.43 
    exif:WhiteBalance: 0
    exif:XResolution: 72/1
    exif:YCbCrPositioning: 1
    exif:YResolution: 72/1
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x1,1x1,1x1
    signature: 7847d24b04c477ab771728ecdea029375d6d88d99fc469400135764329a3a3d7
  Profiles:
    Profile-APP5: 100280 bytes
    Profile-exif: 10132 bytes
  Artifacts:
    filename: P5KHMQOS53org.jpg
    verbose: true
  Tainted: False
  Filesize: 1.538MB
  Number pixels: 4.915M
  Pixels per second: 81.92MB
  User time: 0.060u
  Elapsed time: 0:01.060
  Version: ImageMagick 6.7.8-9 2012-08-11 Q16 http://www.imagemagick.org
identify: Corrupt JPEG data: 162 extraneous bytes before marker 0xd9 `P5KHMQOS53org.jpg' @ warning/jpeg.c/JPEGWarningHandler/346.
je to běžný JPEG, který není úplně v pořádku, viz varování na konci

jestli toto způsobuje problémy, nevím
kachnak
Profil
Vďaka. bola to fotka z mobilu, možno ten to ukladá v takom pokazenom formáte.
Povedal som mu nech si ich dá hromadne uložiť ako JPG cez nejaký obrázkový program a potom nech to nahrá a už to funguje.

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0