小编nit*_*ech的帖子

使用HTML5视频时是否需要WebM和ogv格式?

videojs.com的文档中,我的印象是我需要包含ogv和webm文件格式(除了mp4).

然后我读了http://www.htmlgoodies.com/html5/client/how-to-embed-video-using-html5.html#fbid=erNepglDbZl,看起来我只需要mp4和(ogv或webm).

什么是正确的?我需要这三个吗?

ogg html5-video webm

33
推荐指数
2
解决办法
3万
查看次数

jspm说"达到github速率限制" - 如何解决?

当我jspm install在Aurelia项目中运行JS依赖项时,jspm说Github rate limit reached

怎么修?

github jspm

22
推荐指数
1
解决办法
9103
查看次数

谷歌的Open Sans Regular 400总是斜体?

似乎Google现在以斜体显示Open Sans Regular 400.其他人遇到同样的问题?

各种网站的预览工具也是如此.此屏幕截图来自http://typecast.com/preview/google/Open%20Sans

来自typecast.com

text-rendering google-webfonts

5
推荐指数
1
解决办法
2042
查看次数

WPF标签在包含下划线时获取TextBlock样式

当我在标签文本中包含下划线时,为了获得访问键功能,标签会突然跳过一定数量的像素.

两个标签彼此相对,一个具有额外的PaddingLeft

当我在Kaxaml尝试了这一点,我意识到这是一个StyleTargetType="TextBlock"施加保证金,只有在它与下划线的标签.

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <UserControl.Resources>

      <Style TargetType="TextBlock">
          <Setter Property="VerticalAlignment" Value="Center"/>
          <Setter Property="HorizontalAlignment" Value="Left"/>
          <Setter Property="Margin" Value="5,2,0,1" />
      </Style>

  </UserControl.Resources>
<Grid>  
  <Grid.ColumnDefinitions>
    <ColumnDefinition></ColumnDefinition>
  </Grid.ColumnDefinitions>
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto"></RowDefinition>
    <RowDefinition Height="Auto"></RowDefinition>
  </Grid.RowDefinitions>
  <Label Grid.Column="0" Grid.Row="0">Avfallets _Id:</Label>
  <Label Grid.Column="0" Grid.Row="1">Avfallets Id:</Label>
</Grid>
Run Code Online (Sandbox Code Playgroud)

这里的逻辑是什么?在你添加下划线之前,某种标签不是TextBlock吗?

wpf xaml label

5
推荐指数
0
解决办法
212
查看次数

命令提示符将png转换为swf

我想让用户上传一个带有alpha透明度的PNG文件,并让服务器将其编译为嵌入式PNG文件中带有jpeg压缩的swf文件.

我怎样才能做到这一点?

我想首先我只是构建一个类并使用Flex Framework进行编译,但Flex不会压缩嵌入的PNG文件.您尝试过的人可能最终制作了一个从Flash IDE中编译的assets.swf文件.

任何想法都赞赏.

亲切的问候,nitech

flash command-line png jpeg server-side

3
推荐指数
1
解决办法
2462
查看次数

PHP将png顶部的jpeg与alpha透明度合并

我想把一个jpeg放在png后面 - 这里的png具有alpha透明度.

前景图片在这里:http: //peugeot208.srv.good-morning.no/images/marker-shadow.png

背后的图像是Facebook个人资料图片 - 通常是这样的:https: //graph.facebook.com/100000515495823/picture

结果图像失去透明度而是黑色:http: //peugeot208.srv.good-morning.no/libraries/cache/test.png

这是我使用的代码:

// combine image with shadow
$newCanvas = imagecreatetruecolor(90,135);
$shadow = imagecreatefrompng("marker-shadow.png");  

//imagealphablending($newCanvas, false);
imagesavealpha($newCanvas, true);   

imagecopy($newCanvas, $canvas, 20, 23, 0, 0, 50, 50);
imagecopy($newCanvas, $shadow, 0, 0, 0, 0, 90, 135);
imagepng($newCanvas, $tempfile, floor($quality * 0.09));
Run Code Online (Sandbox Code Playgroud)

如果我启用imagealphablending($ newCanvas,false);,结果是正确的(标记中间的孔是透明的)但是后面的图像消失了.

你能说清楚吗?:-)

谢谢!

编辑:找到解决方案

我做了一些摆弄,最后得到了这个代码 - 原点不是createimagetruecolor,而是从模板创建的图像 - 这是一个透明的png.

现在它可以工作 - 结果是透明的.我真的不知道为什么.知道为什么吗?

fbimage.php

// Create markerIcon 
$src = $_REQUEST['fbid'];

$base_image = imagecreatefrompng("../images/marker-template.png");
$photo = imagecreatefromjpeg("https://graph.facebook.com/".$src."/picture"); …
Run Code Online (Sandbox Code Playgroud)

php png gd2

3
推荐指数
1
解决办法
4515
查看次数