我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

上传高清图像的参数是什么?

I want to check whether user is uploading HD image or normal image. Based on what parameters I can know that image is HD. I want to validate to upload only HD images.

Thanks in advance!!

var image = new Image();
image.src = <image data or link>

Now, you can use the width and height methods exposed by the Image class to get the width and height respectively to check for "HD"

i.e. checking for 1080P

if(image.width != 1920 || image.height != 1080)
{
    alert("Image is not 1080P");
}

近期文章

  • php邮件功能来自åäö的地址?
  • PHP:避免两次显示相同的产品?
  • 图片加在lable怎么不能自动缩放
  • 在php中对多维对象数组进行排序
  • 相同的代码适用于localhost,但在服务器上不起作用
  • 如何在网页上设置条带
  • 使用laravel orm选择自定义字段
  • 如何在新窗口中打开一个功能
  • 如何仅比较存储在数组中的行中的某些单元格
  • PHP会话和浏览器缓存的页面
  • bind_param新手,这段代码出了什么问题?
  • mysql_real_escape_string转换为mysqli
  • onblur文本框生成警告,该电子邮件已存在于数据库中
  • 阻止直接访问html页面
  • PHP ADODB和MySQL,绑定参数
  • PHP通过多维数组循环
  • PHP订单提交总计算
  • 通过PHP发送选择表格到电子邮件
  • 使用MySQL返回JSON字符串中的条目
  • mysqli预处理语句其中var = var dynamic

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华