0

I'm in the process of making a system so our customers can upload images to a database for digital signage. The system is working as intended except for one part, which is the preview of the image that was most recently uploaded so they can make sure it's the correct image they wanted. It is getting clipped between 30-40% of the image height. If i upload something around 1000 pixels it will show around 400 pixels and if the image is shorter it will still show the same % of the image. I've looked through all my CSS and I can't figure out why it's doing this. When i inspect the element on the page there are no height attributes set to it, and if I add them it just adds to the white space where the image should be. My code is way too long to post, but basically I have it stored in the database as a blob and then it pulls the lastid out and displays it, but it's getting clipped. Any help would be greatly appreciated.

exussum
  • 18,275
  • 8
  • 32
  • 65
Doug Leary
  • 119
  • 1
  • 5
  • how large is the image (in bytes)? Maybe the images because its too large to store? http://stackoverflow.com/questions/5775571/what-is-the-maximum-length-of-data-i-can-put-in-a-blob-column-in-mysql – subsub Sep 27 '13 at 16:05

2 Answers2

1

You have most likely tried to upload an image larger than BLOB (65535 bytes). Here is the MySQL Documentation

The best practice here would be to store your images in a folder and store the path to that image in your database.

Brett Santore
  • 799
  • 6
  • 14
0

it has nothing to do with mysql, Mysql clipping your data wouldnt make the image smaller (dimension wise) - it would destroy a part of the image.

Your problem is in the CSS / html - use Google chrome and right click on the image to see what CSS is applied. It will be in there or a parent element which the image can not be larger than (assuming your something which sets max-width:100% )

You may have an overflow:hidden to make it appear clipped. or just another element overlapping it but with a higher z-index

exussum
  • 18,275
  • 8
  • 32
  • 65