Reputation: 483
I am trying to showing cropped images as thubmnails with WideImage.
I made a function with an array of filenames as parameter ($images) where I produce my html
foreach ($images as $img) {
$pathToThumb = str_replace("/upload/images", "/upload/images/thumbs", $img);
$thumb = WideImage::loadFromFile($pathToThumb)->crop('center', 'center', 150, 100)->output('jpg', 100); ?>
<div class="lingerie">
<a class="fancybox" rel="group" href="<?php print $img; ?>">
<img src="<?php echo $thumb; ?>" alt=""/>
</a>
</div>
<?php } ? ?>
For now, all I get is
����JFIF``���u i$�J�$��]5�����j4���%�o�WEʴ���^[7��|��6�d��P$g�bx�e��wh����N��c��rp=Oz��h�F�Z��"��u8q�oN��la_28�g�����1��2G��1^Uy�EJ��'��|��9F[����Vn��2m�j�i��ַߣ,4���? ����2zp3�P[|���>���1���8$u��+cQ��:x���-�II^r1��{U�+O��T�x��*b��3����zv�m �)b�U��j�+'B�`m������a����T��r���Tq�1�*�����{D_s�!AbG;v��������/i5��u�ݶ]�����M�]�]���#$Z���74"+ar]�-�',�B���J��W�}KY�/7H#��7�3-n�=���v�Ps�3�C~��N��h��j�q��6�����- and so on
What is the reason for these weird digits?
Upvotes: 1
Views: 144