var switchTo5x=true; stLight.options({publisher: "daefb5fc-5bce-4da6-b47b-5148ed50db65", doNotHash: false, doNotCopy: false, hashAddressBar: false}); window.onload = function() { var img = document.getElementById('img'), /** * 图片按比例自适应缩放 * @param img {Element} 用户上传的图片 * @param maxWidth {Number} 预览区域的最大宽度 * @param maxHeight {Number} 预览区域的最大高度 */ resizeImg = function(img, maxWidth, maxHeight){ var w = img.width, h = img.height; // 当图片比预览区域小时不做任何改变 if(w < maxWidth && h < maxHeight) return; // 当实际图片比例大于预览区域宽高比例时 // 缩放图片宽度,反之缩放图片宽度 w/h > maxWidth/maxHeight ? img.width = maxWidth : img.height = maxHeight; }; resizeImg(img, 600, 300); }

Home > Press Area > Market Trend

  • Pegatron to be primary assembler of budget iPhone

    Apple will use Pegatron — not Foxconn — as its primary assembler for the company’s new low-cost iPhone “expected to be offered later this year,” according to a new report. A rival of Foxconn, Pegatron was a “minor producer” of iPhones in 2011 and also made iPad minis last year. Sources say Apple decided to use Pegatron to diversify its manufacturing after Foxconn had issues with scratches on the iPhone 5’s metal casing, and because Apple is expanding its product lines. While some claim Pegatron will accept smaller profits to produce Apple products, neither company has commented.[via ilounge